whisperity created this revision. whisperity added reviewers: rsmith, doug.gregor. whisperity added a project: clang. Herald added subscribers: Szelethus, dkrupp, rnkovacs.
The current version only emits the below error for a module (attempted to be loaded) from the `prebuilt-module-path`: error: module file blabla.pcm cannot be loaded due to a configuration mismatch with the current compilation [-Wmodule-file-config-mismatch] With this change, if the prebuilt module is used, we allow the proper diagnostic behind the configuration mismatch to be shown. error: POSIX thread support was disabled in PCH file but is currently enabled error: module file blabla.pcm cannot be loaded due to a configuration mismatch with the current compilation [-Wmodule-file-config-mismatch] (A few lines later an error is emitted anyways, so there is no reason not to complain for configuration mismatches if a config mismatch is found and kills the build.) Repository: rC Clang https://reviews.llvm.org/D53334 Files: lib/Frontend/CompilerInstance.cpp Index: lib/Frontend/CompilerInstance.cpp =================================================================== --- lib/Frontend/CompilerInstance.cpp +++ lib/Frontend/CompilerInstance.cpp @@ -1724,7 +1724,9 @@ // module cache, we don't know how to rebuild modules. unsigned ARRFlags = Source == ModuleCache ? ASTReader::ARR_OutOfDate | ASTReader::ARR_Missing : - ASTReader::ARR_ConfigurationMismatch; + Source == PrebuiltModulePath ? + 0 : + ASTReader::ARR_ConfigurationMismatch; switch (ModuleManager->ReadAST(ModuleFileName, Source == PrebuiltModulePath ? serialization::MK_PrebuiltModule
Index: lib/Frontend/CompilerInstance.cpp =================================================================== --- lib/Frontend/CompilerInstance.cpp +++ lib/Frontend/CompilerInstance.cpp @@ -1724,7 +1724,9 @@ // module cache, we don't know how to rebuild modules. unsigned ARRFlags = Source == ModuleCache ? ASTReader::ARR_OutOfDate | ASTReader::ARR_Missing : - ASTReader::ARR_ConfigurationMismatch; + Source == PrebuiltModulePath ? + 0 : + ASTReader::ARR_ConfigurationMismatch; switch (ModuleManager->ReadAST(ModuleFileName, Source == PrebuiltModulePath ? serialization::MK_PrebuiltModule
_______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits