aboutsummaryrefslogtreecommitdiff
path: root/clang/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
commita739d9a023fe14d1cd5cc9838b8ad4a06f265c48 (patch)
tree9db928017707240d5dfa0d6364fbb882facddaa2 /clang/lib/Frontend/CompilerInvocation.cpp
parent663c068d46adad59b821aa7a638ee85e39d76182 (diff)
downloadllvm-a739d9a023fe14d1cd5cc9838b8ad4a06f265c48.zip
llvm-a739d9a023fe14d1cd5cc9838b8ad4a06f265c48.tar.gz
llvm-a739d9a023fe14d1cd5cc9838b8ad4a06f265c48.tar.bz2
Encode the module hash in base-36, to reduce the length of the strings a bit
llvm-svn: 139696
Diffstat (limited to 'clang/lib/Frontend/CompilerInvocation.cpp')
-rw-r--r--clang/lib/Frontend/CompilerInvocation.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/clang/lib/Frontend/CompilerInvocation.cpp b/clang/lib/Frontend/CompilerInvocation.cpp
index 6c47d7b..c594526 100644
--- a/clang/lib/Frontend/CompilerInvocation.cpp
+++ b/clang/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);
}