From: Douglas Gregor Date: Tue, 13 Sep 2011 23:20:27 +0000 (+0000) Subject: Assert that the module hash produced after stripping away non-modular options is... X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=76d991ec6c5cd247ee18fe65c35d43c2d47cf094;p=clang 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 720f7bb582..9a679eed24 100644 --- a/lib/Frontend/CompilerInstance.cpp +++ b/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.