aboutsummaryrefslogtreecommitdiff
path: root/lib/Frontend/CompilerInvocation.cpp
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2011-09-14 15:55:12 +0000
committerDouglas Gregor <dgregor@apple.com>2011-09-14 15:55:12 +0000
commit815759cb08d5b91e2585b200bcf20822e0d422ad (patch)
treeeea99cf9fd1e8dcd878f6985b81c387fd2236b5f /lib/Frontend/CompilerInvocation.cpp
parent2121cdaa41dbf4f64a1f2979af242b54987d661e (diff)
Encode the module hash in base-36, to reduce the length of the strings a bit
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139696 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Frontend/CompilerInvocation.cpp')
-rw-r--r--lib/Frontend/CompilerInvocation.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/Frontend/CompilerInvocation.cpp b/lib/Frontend/CompilerInvocation.cpp
index 6c47d7b114..c594526cea 100644
--- a/lib/Frontend/CompilerInvocation.cpp
+++ b/lib/Frontend/CompilerInvocation.cpp
@@ -1991,8 +1991,12 @@ std::string CompilerInvocation::getModuleHash() const {
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);
}