[cfe-commits] r139696 - /cfe/trunk/lib/Frontend/CompilerInvocation.cpp

Douglas Gregor dgregor at apple.com
Wed Sep 14 08:55:12 PDT 2011


Author: dgregor
Date: Wed Sep 14 10:55:12 2011
New Revision: 139696

URL: http://llvm.org/viewvc/llvm-project?rev=139696&view=rev
Log:
Encode the module hash in base-36, to reduce the length of the strings a bit

Modified:
    cfe/trunk/lib/Frontend/CompilerInvocation.cpp

Modified: cfe/trunk/lib/Frontend/CompilerInvocation.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Frontend/CompilerInvocation.cpp?rev=139696&r1=139695&r2=139696&view=diff
==============================================================================
--- cfe/trunk/lib/Frontend/CompilerInvocation.cpp (original)
+++ cfe/trunk/lib/Frontend/CompilerInvocation.cpp Wed Sep 14 10:55:12 2011
@@ -1991,8 +1991,12 @@
   Signature.add((unsigned)T.getOS(), 5);
   Signature.add((unsigned)T.getEnvironment(), 4);
 
+  // Extend the signature with preprocessor options.
+  Signature.add(getPreprocessorOpts().UsePredefines, 1);
+  Signature.add(getPreprocessorOpts().DetailedRecord, 1);
+  
   // We've generated the signature. Treat it as one large APInt that we'll
-  // encode as hex and return.
+  // encode in base-36 and return.
   Signature.flush();
-  return Signature.getAsInteger().toString(16, /*Signed=*/false);
+  return Signature.getAsInteger().toString(36, /*Signed=*/false);
 }





More information about the cfe-commits mailing list