Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /// Make use of the padding bits by allowing derived class to store data here.
- /// NOTE: Derived classes are expected to initialize the bitfields.
- LLVM_PACKED(union Bits {
- Bits() : raw() {}
- // Raw bits (to zero-init the union)
- char raw[7];
- // NamedDecl bits
- struct {
- bool illegalRedeclaration : 1;
- union {
- // VarDecl bits
- struct {
- bool isMutable : 1;
- } varDecl;
- // FuncDecl bits
- struct {
- bool bodyChecked : 1;
- } funcDecl;
- };
- } namedDecl;
- });
- static_assert(sizeof(Bits) == 7, "Bits is too large!");
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement