Assert that the module hash produced after stripping away non-modular options is the same as the module hash before stripping those options.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139663 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Frontend/CompilerInstance.cpp b/lib/Frontend/CompilerInstance.cpp
index 720f7bb..9a679ee 100644
--- a/lib/Frontend/CompilerInstance.cpp
+++ b/lib/Frontend/CompilerInstance.cpp
@@ -671,9 +671,8 @@
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.