[cfe-commits] r42719 - /cfe/trunk/include/clang/Lex/IdentifierTable.h
Chris Lattner
sabre at nondot.org
Sat Oct 6 23:29:32 PDT 2007
Author: lattner
Date: Sun Oct 7 01:29:32 2007
New Revision: 42719
URL: http://llvm.org/viewvc/llvm-project?rev=42719&view=rev
Log:
Shrink the builtinID down by 3 bits, allowing all the bitfields to
fit in 32-bits, shrinking IdentifierInfo by a word.
This shrinks the total size of the identifier pool from
1817264 to 1634428 bytes (11%) on carbon.h.
Modified:
cfe/trunk/include/clang/Lex/IdentifierTable.h
Modified: cfe/trunk/include/clang/Lex/IdentifierTable.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Lex/IdentifierTable.h?rev=42719&r1=42718&r2=42719&view=diff
==============================================================================
--- cfe/trunk/include/clang/Lex/IdentifierTable.h (original)
+++ cfe/trunk/include/clang/Lex/IdentifierTable.h Sun Oct 7 01:29:32 2007
@@ -41,7 +41,7 @@
tok::TokenKind TokenID : 8; // Front-end token ID or tok::identifier.
tok::PPKeywordKind PPID : 5; // ID for preprocessor command like #'ifdef'.
tok::ObjCKeywordKind ObjCID : 5; // ID for objc @ keyword like @'protocol'.
- unsigned BuiltinID :12; // ID if this is a builtin (__builtin_inf).
+ unsigned BuiltinID : 9; // ID if this is a builtin (__builtin_inf).
bool IsExtension : 1; // True if identifier is a lang extension.
bool IsPoisoned : 1; // True if identifier is poisoned.
bool IsOtherTargetMacro : 1; // True if ident is macro on another target.
@@ -97,8 +97,8 @@
/// 2+ are specific builtin functions.
unsigned getBuiltinID() const { return BuiltinID; }
void setBuiltinID(unsigned ID) {
- assert(ID < (1 << 12) && "ID too large for field!");
BuiltinID = ID;
+ assert(BuiltinID == ID && "ID too large for field!");
}
/// isNonPortableBuiltin - Return true if this identifier corresponds to a
More information about the cfe-commits
mailing list