summaryrefslogtreecommitdiffstats
path: root/clang/lib/Frontend/CompilerInstance.cpp
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2011-09-13 23:20:27 +0000
committerDouglas Gregor <dgregor@apple.com>2011-09-13 23:20:27 +0000
commit3728ea75d9c5cf9c7228c57a2bac916848c40e03 (patch)
treedce18d848ed403a51d28a2cd0bc466ee8d0cc616 /clang/lib/Frontend/CompilerInstance.cpp
parent1735f4e752d11213f7475117767d0fd7869669fe (diff)
downloadbcm5719-llvm-3728ea75d9c5cf9c7228c57a2bac916848c40e03.tar.gz
bcm5719-llvm-3728ea75d9c5cf9c7228c57a2bac916848c40e03.zip
Assert that the module hash produced after stripping away non-modular options is the same as the module hash before stripping those options.
llvm-svn: 139663
Diffstat (limited to 'clang/lib/Frontend/CompilerInstance.cpp')
-rw-r--r--clang/lib/Frontend/CompilerInstance.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/clang/lib/Frontend/CompilerInstance.cpp b/clang/lib/Frontend/CompilerInstance.cpp
index 720f7bb5820..9a679eed24d 100644
--- a/clang/lib/Frontend/CompilerInstance.cpp
+++ b/clang/lib/Frontend/CompilerInstance.cpp
@@ -671,9 +671,8 @@ static void compileModule(CompilerInstance &ImportingInstance,
Invocation->getDiagnosticOpts().VerifyDiagnostics = 0;
- // FIXME: Strip away all of the compilation options that won't be transferred
- // down to the module. This presumably includes -D flags, optimization
- // settings, etc.
+ assert(ImportingInstance.getInvocation().getModuleHash() ==
+ Invocation->getModuleHash() && "Module hash mismatch!");
// Construct a compiler instance that will be used to actually create the
// module.
OpenPOWER on IntegriCloud