summaryrefslogtreecommitdiffstats
path: root/clang/lib/Frontend/CompilerInstance.cpp
diff options
context:
space:
mode:
authorBruno Cardoso Lopes <bruno.cardoso@gmail.com>2018-07-12 17:38:48 +0000
committerBruno Cardoso Lopes <bruno.cardoso@gmail.com>2018-07-12 17:38:48 +0000
commit773c7c4b6e82921b06f4622158f9fcf3e4a44bd2 (patch)
tree33be4b0d862ea9e5185d53160838f77c34caca44 /clang/lib/Frontend/CompilerInstance.cpp
parent13af7947263ed4441b650a42e6ba2f238386222c (diff)
downloadbcm5719-llvm-773c7c4b6e82921b06f4622158f9fcf3e4a44bd2.tar.gz
bcm5719-llvm-773c7c4b6e82921b06f4622158f9fcf3e4a44bd2.zip
Revert "[modules] Fix 37878; Autoload subdirectory modulemaps with specific LangOpts"
This reverts commit f40124d4f05ecf4f880cf4e8f26922d861f705f3 / r336660. This change shouldn't be affecting `@import` behavior, but turns out it is: https://ci.swift.org/view/swift-master-next/job/oss-swift-incremental-RA-osx-master-next/2800/consoleFull#-12570166563122a513-f36a-4c87-8ed7-cbc36a1ec144 Working on a reduced testcase for this, reverting in the meantime. rdar://problem/42102222 llvm-svn: 336920
Diffstat (limited to 'clang/lib/Frontend/CompilerInstance.cpp')
-rw-r--r--clang/lib/Frontend/CompilerInstance.cpp15
1 files changed, 5 insertions, 10 deletions
diff --git a/clang/lib/Frontend/CompilerInstance.cpp b/clang/lib/Frontend/CompilerInstance.cpp
index 155ead4ac8e..5727aae5f14 100644
--- a/clang/lib/Frontend/CompilerInstance.cpp
+++ b/clang/lib/Frontend/CompilerInstance.cpp
@@ -1653,10 +1653,8 @@ CompilerInstance::loadModule(SourceLocation ImportLoc,
// Retrieve the cached top-level module.
Module = Known->second;
} else if (ModuleName == getLangOpts().CurrentModule) {
- // This is the module we're building.
- Module = PP->getHeaderSearchInfo().lookupModule(
- ModuleName, /*AllowSearch*/ true,
- /*AllowExtraModuleMapSearch*/ !IsInclusionDirective);
+ // This is the module we're building.
+ Module = PP->getHeaderSearchInfo().lookupModule(ModuleName);
/// FIXME: perhaps we should (a) look for a module using the module name
// to file map (PrebuiltModuleFiles) and (b) diagnose if still not found?
//if (Module == nullptr) {
@@ -1668,8 +1666,7 @@ CompilerInstance::loadModule(SourceLocation ImportLoc,
Known = KnownModules.insert(std::make_pair(Path[0].first, Module)).first;
} else {
// Search for a module with the given name.
- Module = PP->getHeaderSearchInfo().lookupModule(ModuleName, true,
- !IsInclusionDirective);
+ Module = PP->getHeaderSearchInfo().lookupModule(ModuleName);
HeaderSearchOptions &HSOpts =
PP->getHeaderSearchInfo().getHeaderSearchOpts();
@@ -1746,8 +1743,7 @@ CompilerInstance::loadModule(SourceLocation ImportLoc,
ImportLoc, ARRFlags)) {
case ASTReader::Success: {
if (Source != ModuleCache && !Module) {
- Module = PP->getHeaderSearchInfo().lookupModule(ModuleName, true,
- !IsInclusionDirective);
+ Module = PP->getHeaderSearchInfo().lookupModule(ModuleName);
if (!Module || !Module->getASTFile() ||
FileMgr->getFile(ModuleFileName) != Module->getASTFile()) {
// Error out if Module does not refer to the file in the prebuilt
@@ -1878,8 +1874,7 @@ CompilerInstance::loadModule(SourceLocation ImportLoc,
PrivateModule, PP->getIdentifierInfo(Module->Name)->getTokenID());
PrivPath.push_back(std::make_pair(&II, Path[0].second));
- if (PP->getHeaderSearchInfo().lookupModule(PrivateModule, true,
- !IsInclusionDirective))
+ if (PP->getHeaderSearchInfo().lookupModule(PrivateModule))
Sub =
loadModule(ImportLoc, PrivPath, Visibility, IsInclusionDirective);
if (Sub) {
OpenPOWER on IntegriCloud