Introduce an opt-in warning when a module is being implicitly built
from sources.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140746 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Frontend/CompilerInstance.cpp b/lib/Frontend/CompilerInstance.cpp
index 554ca35..27fe3f1 100644
--- a/lib/Frontend/CompilerInstance.cpp
+++ b/lib/Frontend/CompilerInstance.cpp
@@ -752,6 +752,8 @@
return 0;
}
+ getDiagnostics().Report(ModuleNameLoc, diag::warn_module_build)
+ << ModuleName.getName();
BuildingModule = true;
compileModule(*this, ModuleName.getName(), ModuleFileName, UmbrellaHeader);
ModuleFile = PP->getHeaderSearchInfo().lookupModule(ModuleName.getName());