summaryrefslogtreecommitdiffstats
path: root/clang/lib/Frontend/CompilerInstance.cpp
diff options
context:
space:
mode:
authorBen Langmuir <blangmuir@apple.com>2014-05-05 05:31:33 +0000
committerBen Langmuir <blangmuir@apple.com>2014-05-05 05:31:33 +0000
commit527040e0c87ac8d6cdde46be51c1a93e098bb5fd (patch)
treeafcff5e3af5543aff587f498b4c4ad5fdc6416de /clang/lib/Frontend/CompilerInstance.cpp
parentd29607871f661c9cde7f60fbf3adeae4fb6d82bc (diff)
downloadbcm5719-llvm-527040e0c87ac8d6cdde46be51c1a93e098bb5fd.tar.gz
bcm5719-llvm-527040e0c87ac8d6cdde46be51c1a93e098bb5fd.zip
Make module self-import an error
Ideally, importing Foo.a from Foo.b would "do the right thing", but until it does, this patch makes it an error rather than allow it to silently be ignored. llvm-svn: 207948
Diffstat (limited to 'clang/lib/Frontend/CompilerInstance.cpp')
-rw-r--r--clang/lib/Frontend/CompilerInstance.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/lib/Frontend/CompilerInstance.cpp b/clang/lib/Frontend/CompilerInstance.cpp
index 76301f2a44e..d7b526b2da2 100644
--- a/clang/lib/Frontend/CompilerInstance.cpp
+++ b/clang/lib/Frontend/CompilerInstance.cpp
@@ -1164,7 +1164,7 @@ CompilerInstance::loadModule(SourceLocation ImportLoc,
Module = Known->second;
} else if (ModuleName == getLangOpts().CurrentModule) {
// This is the module we're building.
- Module = PP->getHeaderSearchInfo().getModuleMap().findModule(ModuleName);
+ Module = PP->getHeaderSearchInfo().lookupModule(ModuleName);
Known = KnownModules.insert(std::make_pair(Path[0].first, Module)).first;
} else {
// Search for a module with the given name.
OpenPOWER on IntegriCloud