r339017 - [AST] Move the enum in ObjCMethodDeclBitfields

Bruno Ricci via cfe-commits cfe-commits at lists.llvm.org
Mon Aug 6 07:33:45 PDT 2018


Author: brunoricci
Date: Mon Aug  6 07:33:45 2018
New Revision: 339017

URL: http://llvm.org/viewvc/llvm-project?rev=339017&view=rev
Log:
[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)

Modified:
    cfe/trunk/include/clang/AST/DeclBase.h

Modified: cfe/trunk/include/clang/AST/DeclBase.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/AST/DeclBase.h?rev=339017&r1=339016&r2=339017&view=diff
==============================================================================
--- cfe/trunk/include/clang/AST/DeclBase.h (original)
+++ cfe/trunk/include/clang/AST/DeclBase.h Mon Aug  6 07:33:45 2018
@@ -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.




More information about the cfe-commits mailing list