[clang] b10bd6d - [NFC] Bump ObjCOrBuiltinIDBits to 15

JF Bastien via cfe-commits cfe-commits at lists.llvm.org
Fri Jun 26 13:50:07 PDT 2020


Author: JF Bastien
Date: 2020-06-26T13:48:51-07:00
New Revision: b10bd6dfc62161671892b2dd3be5152754d14995

URL: https://github.com/llvm/llvm-project/commit/b10bd6dfc62161671892b2dd3be5152754d14995
DIFF: https://github.com/llvm/llvm-project/commit/b10bd6dfc62161671892b2dd3be5152754d14995.diff

LOG: [NFC] Bump ObjCOrBuiltinIDBits to 15

We're now hitting this because we're at the limit for number of builtins:
  clang/lib/Basic/IdentifierTable.cpp:39:1: error: static_assert failed due to requirement '2 * LargestBuiltinID < (2 << (ObjCOrBuiltinIDBits - 1))' "Insufficient ObjCOrBuiltinID Bits"
  static_assert(2 * LargestBuiltinID < (2 << (ObjCOrBuiltinIDBits - 1)),
  ^             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Bump it to 15 so whoever adds a builtin next (as I am, or as anyone else might) doesn't merge conflict over each other.

Added: 
    

Modified: 
    clang/include/clang/Basic/IdentifierTable.h

Removed: 
    


################################################################################
diff  --git a/clang/include/clang/Basic/IdentifierTable.h b/clang/include/clang/Basic/IdentifierTable.h
index 31849bbdd545..fc554a35e721 100644
--- a/clang/include/clang/Basic/IdentifierTable.h
+++ b/clang/include/clang/Basic/IdentifierTable.h
@@ -48,7 +48,7 @@ using IdentifierLocPair = std::pair<IdentifierInfo *, SourceLocation>;
 /// of a pointer to one of these classes.
 enum { IdentifierInfoAlignment = 8 };
 
-static constexpr int ObjCOrBuiltinIDBits = 14;
+static constexpr int ObjCOrBuiltinIDBits = 15;
 
 /// One of these records is kept for each identifier that
 /// is lexed.  This contains information about whether the token was \#define'd,


        


More information about the cfe-commits mailing list