]> granicus.if.org Git - clang/commitdiff
Assert that the module hash produced after stripping away non-modular options is...
authorDouglas Gregor <dgregor@apple.com>
Tue, 13 Sep 2011 23:20:27 +0000 (23:20 +0000)
committerDouglas Gregor <dgregor@apple.com>
Tue, 13 Sep 2011 23:20:27 +0000 (23:20 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139663 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Frontend/CompilerInstance.cpp

index 720f7bb58207df8c5c545215c69462c27eace5f3..9a679eed24dddb30f466322406eee04e5f3838ad 100644 (file)
@@ -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.