[cfe-commits] [PATCH] Macro history (de-)serialization.

Alexander Kornienko reviews at llvm-reviews.chandlerc.com
Thu Sep 13 12:10:07 PDT 2012



================
Comment at: tools/clang/lib/Serialization/ASTReader.cpp:541-542
@@ -540,4 +543,2 @@
   Bits >>= 1;
-  unsigned ObjCOrBuiltinID = Bits & 0x7FF;
-  Bits >>= 11;
 
----------------
Richard Smith wrote:
> Do we actually use all 11 bits of ObjCOrBuiltinID? If we can just shrink it to 10 bits, that would seem preferable.
I tried to do this and immediately saw IDs 1030 and 1047.

================
Comment at: tools/clang/include/clang/Lex/Preprocessor.h:474
@@ +473,3 @@
+  /// identifiers that hadMacroDefinition().
+  MacroInfo *getInfoForMacro(IdentifierInfo *II) const;
+
----------------
Richard Smith wrote:
> If we're going to expose this, I think it should be renamed to avoid confusion with "getMacroInfo". How about "getMacroInfoHistory"?
Done.


http://llvm-reviews.chandlerc.com/D41



More information about the cfe-commits mailing list