r180601 - Use bitfilds.
Rafael Espindola
rafael.espindola at gmail.com
Fri Apr 26 05:31:12 PDT 2013
Author: rafael
Date: Fri Apr 26 07:31:12 2013
New Revision: 180601
URL: http://llvm.org/viewvc/llvm-project?rev=180601&view=rev
Log:
Use bitfilds.
On a 32 bit build this moves LinkageSpecDecl from 52 to 48 bytes.
Modified:
cfe/trunk/include/clang/AST/DeclCXX.h
Modified: cfe/trunk/include/clang/AST/DeclCXX.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/AST/DeclCXX.h?rev=180601&r1=180600&r2=180601&view=diff
==============================================================================
--- cfe/trunk/include/clang/AST/DeclCXX.h (original)
+++ cfe/trunk/include/clang/AST/DeclCXX.h Fri Apr 26 07:31:12 2013
@@ -2351,12 +2351,12 @@ public:
};
private:
/// Language - The language for this linkage specification.
- LanguageIDs Language;
+ unsigned Language : 3;
/// True if this linkage spec has brances. This is needed so that hasBraces()
/// returns the correct result while the linkage spec body is being parsed.
/// Once RBraceLoc has been set this is not used, so it doesn't need to be
/// serialized.
- bool HasBraces;
+ unsigned HasBraces : 1;
/// ExternLoc - The source location for the extern keyword.
SourceLocation ExternLoc;
/// RBraceLoc - The source location for the right brace (if valid).
@@ -2376,7 +2376,7 @@ public:
static LinkageSpecDecl *CreateDeserialized(ASTContext &C, unsigned ID);
/// \brief Return the language specified by this linkage specification.
- LanguageIDs getLanguage() const { return Language; }
+ LanguageIDs getLanguage() const { return LanguageIDs(Language); }
/// \brief Set the language specified by this linkage specification.
void setLanguage(LanguageIDs L) { Language = L; }
More information about the cfe-commits
mailing list