CodeView need to know the offset of the storage allocation for a
bitfield. Encode this via the "extraData" field in DIDerivedType and
introduced a new flag, DIFlagBitField, to indicate whether or not a
member is a bitfield.
Details
Details
Diff Detail
Diff Detail
Event Timeline
Comment Actions
Looks good.
I suggest to add a test that covers more cases, see below.
Also, need to apply changes to dwarf implementation (I think it does not cover the below case correctly today).
I am adding David Blaikie as a reviewer.
test/DebugInfo/COFF/bitfields.ll | ||
---|---|---|
4 | How about having full test of bitfield. This test contains only the last issue. #pragma pack(1) struct S1 { char x1[2]; char x2; int y : 23; int z : 23; int w : 2; struct { char c; short s; } v; short u : 3; } s1; #pragma pack(1) struct S2 { char : 0; int y : 1; } s2; #pragma pack(1) struct S3 { char : 8; short : 8; short x : 8; } s3; Or at least parts of it. |
Comment Actions
The DWARF side is not accurate for versions < v4 but this can be fixed in a latter change.
I am adding David Blaikie as a reviewer.
How about having full test of bitfield. This test contains only the last issue.
How about this one:
Or at least parts of it.