llvm-project
d2a9df2c - [TBAA] Handle bitfields when generating !tbaa.struct metadata. (#82922)

Commit
1 year ago
[TBAA] Handle bitfields when generating !tbaa.struct metadata. (#82922) At the moment, clang generates what I believe are incorrect !tbaa.struct fields for named bitfields. At the moment, the base type size is used for named bifields (e.g. sizeof(int)) instead of the bifield width per field. This results in overalpping fields in !tbaa.struct metadata. This causes incorrect results when extracting individual copied fields from !tbaa.struct as in added in dc85719d5. This patch fixes that by skipping by combining adjacent bitfields in fields with correct sizes. Fixes https://github.com/llvm/llvm-project/issues/82586
Author
Parents
Loading