From: Bruno Ricci Date: Mon, 6 Aug 2018 14:33:45 +0000 (+0000) Subject: [AST] Move the enum in ObjCMethodDeclBitfields X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=e8666eae295bab4a01f80baa4a05a03f3504c332;p=clang [AST] Move the enum in ObjCMethodDeclBitfields Move the enum { ObjCMethodFamilyBitWidth = 4 } to the top of the class. For some dark reason having the enum between the bitfields breaks the packing with gcc version 7.3-win32 20180312. Reported by: Abramo Bagnara (by email) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@339017 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/include/clang/AST/DeclBase.h b/include/clang/AST/DeclBase.h index 3f7f756a34..8535711122 100644 --- a/include/clang/AST/DeclBase.h +++ b/include/clang/AST/DeclBase.h @@ -1554,8 +1554,6 @@ class DeclContext { /// methods in ObjCMethodDecl should be updated appropriately. class ObjCMethodDeclBitfields { friend class ObjCMethodDecl; - /// For the bits in DeclContextBitfields. - uint64_t : NumDeclContextBits; /// This is needed for the bitwidth of Family below but /// is defined in Basic/IdentifierTable.h which we do not include. @@ -1564,6 +1562,9 @@ class DeclContext { /// that these two ObjCMethodFamilyBitWidth are equal. enum { ObjCMethodFamilyBitWidth = 4 }; + /// For the bits in DeclContextBitfields. + uint64_t : NumDeclContextBits; + /// The conventional meaning of this method; an ObjCMethodFamily. /// This is not serialized; instead, it is computed on demand and /// cached.