summaryrefslogtreecommitdiffstats
path: root/clang/lib
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2011-09-29 00:52:27 +0000
committerDouglas Gregor <dgregor@apple.com>2011-09-29 00:52:27 +0000
commit44e688d46a2d20fdb2cf83f8a81f57e8c85f5f2b (patch)
tree6b88c5d39ecf599ec9dffca2691b9f0e402c2a24 /clang/lib
parentd299dccf9188b740e4e34a6e1d8f6a8345c796fe (diff)
downloadbcm5719-llvm-44e688d46a2d20fdb2cf83f8a81f57e8c85f5f2b.tar.gz
bcm5719-llvm-44e688d46a2d20fdb2cf83f8a81f57e8c85f5f2b.zip
Introduce an opt-in warning when a module is being implicitly built
from sources. llvm-svn: 140746
Diffstat (limited to 'clang/lib')
-rw-r--r--clang/lib/Frontend/CompilerInstance.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/clang/lib/Frontend/CompilerInstance.cpp b/clang/lib/Frontend/CompilerInstance.cpp
index 554ca352e1c..27fe3f15ffa 100644
--- a/clang/lib/Frontend/CompilerInstance.cpp
+++ b/clang/lib/Frontend/CompilerInstance.cpp
@@ -752,6 +752,8 @@ ModuleKey CompilerInstance::loadModule(SourceLocation ImportLoc,
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());
OpenPOWER on IntegriCloud