[PATCH] D21489: [codeview] Added support for bitfield type
David Majnemer via llvm-commits
llvm-commits at lists.llvm.org
Sun Jun 26 21:22:34 PDT 2016
majnemer added a comment.
Consider this input:
#pragma pack(1)
struct S {
char : 8;
short : 8;
short x : 8;
} s;
Your patch appears to give:
BitField (0x1001) {
TypeLeafKind: LF_BITFIELD (0x1205)
Type: short (0x11)
BitSize: 8
BitOffset: 0
}
FieldList (0x1002) {
TypeLeafKind: LF_FIELDLIST (0x1203)
DataMember {
AccessSpecifier: Public (0x3)
Type: 0x1001
FieldOffset: 0x2
Name: x
}
}
MSVC gives:
BitField (0x1001) {
TypeLeafKind: LF_BITFIELD (0x1205)
Type: short (0x11)
BitSize: 8
BitOffset: 8
}
FieldList (0x1002) {
TypeLeafKind: LF_FIELDLIST (0x1203)
DataMember {
AccessSpecifier: Public (0x3)
Type: 0x1001
FieldOffset: 0x1
Name: x
}
}
http://reviews.llvm.org/D21489
More information about the llvm-commits
mailing list