r274983 - [AST] Tighten up some bitfields

David Majnemer via cfe-commits cfe-commits at lists.llvm.org
Sat Jul 9 12:26:19 PDT 2016


Author: majnemer
Date: Sat Jul  9 14:26:19 2016
New Revision: 274983

URL: http://llvm.org/viewvc/llvm-project?rev=274983&view=rev
Log:
[AST] Tighten up some bitfields

Optimize the bitfield types to conserve space for the MSVC ABI.

Modified:
    cfe/trunk/include/clang/AST/DeclFriend.h
    cfe/trunk/include/clang/AST/DeclObjC.h

Modified: cfe/trunk/include/clang/AST/DeclFriend.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/AST/DeclFriend.h?rev=274983&r1=274982&r2=274983&view=diff
==============================================================================
--- cfe/trunk/include/clang/AST/DeclFriend.h (original)
+++ cfe/trunk/include/clang/AST/DeclFriend.h Sat Jul  9 14:26:19 2016
@@ -57,7 +57,7 @@ private:
   /// True if this 'friend' declaration is unsupported.  Eventually we
   /// will support every possible friend declaration, but for now we
   /// silently ignore some and set this flag to authorize all access.
-  bool UnsupportedFriend : 1;
+  unsigned UnsupportedFriend : 1;
 
   // The number of "outer" template parameter lists in non-templatic
   // (currently unsupported) friend type declarations, such as

Modified: cfe/trunk/include/clang/AST/DeclObjC.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/AST/DeclObjC.h?rev=274983&r1=274982&r2=274983&view=diff
==============================================================================
--- cfe/trunk/include/clang/AST/DeclObjC.h (original)
+++ cfe/trunk/include/clang/AST/DeclObjC.h Sat Jul  9 14:26:19 2016
@@ -1124,15 +1124,15 @@ class ObjCInterfaceDecl : public ObjCCon
 
     /// \brief Indicates that the contents of this Objective-C class will be
     /// completed by the external AST source when required.
-    mutable bool ExternallyCompleted : 1;
+    mutable unsigned ExternallyCompleted : 1;
 
     /// \brief Indicates that the ivar cache does not yet include ivars
     /// declared in the implementation.
-    mutable bool IvarListMissingImplementation : 1;
+    mutable unsigned IvarListMissingImplementation : 1;
 
     /// Indicates that this interface decl contains at least one initializer
     /// marked with the 'objc_designated_initializer' attribute.
-    bool HasDesignatedInitializers : 1;
+    unsigned HasDesignatedInitializers : 1;
 
     enum InheritedDesignatedInitializersState {
       /// We didn't calculate whether the designated initializers should be




More information about the cfe-commits mailing list