Skip to content

Commit 8979602

Browse files
authored
Merge pull request #39810 from apple/jan_svoboda/search_path_remark_sloc
[ClangImporter] Pass `SourceLocation` to `lookupModule`
2 parents aef70f0 + 7f344cb commit 8979602

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

lib/ClangImporter/ClangImporter.cpp

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1764,8 +1764,8 @@ void ClangImporter::collectSubModuleNames(
17641764

17651765
// Look up the top-level module first.
17661766
clang::Module *clangModule = clangHeaderSearch.lookupModule(
1767-
path.front().Item.str(), /*AllowSearch=*/true,
1768-
/*AllowExtraModuleMapSearch=*/true);
1767+
path.front().Item.str(), /*ImportLoc=*/clang::SourceLocation(),
1768+
/*AllowSearch=*/true, /*AllowExtraModuleMapSearch=*/true);
17691769
if (!clangModule)
17701770
return;
17711771
clang::Module *submodule = clangModule;
@@ -1793,9 +1793,9 @@ bool ClangImporter::canImportModule(ImportPath::Element moduleID,
17931793
// Look up the top-level module to see if it exists.
17941794
// FIXME: This only works with top-level modules.
17951795
auto &clangHeaderSearch = Impl.getClangPreprocessor().getHeaderSearchInfo();
1796-
clang::Module *clangModule =
1797-
clangHeaderSearch.lookupModule(moduleID.Item.str(), /*AllowSearch=*/true,
1798-
/*AllowExtraModuleMapSearch=*/true);
1796+
clang::Module *clangModule = clangHeaderSearch.lookupModule(
1797+
moduleID.Item.str(), /*ImportLoc=*/clang::SourceLocation(),
1798+
/*AllowSearch=*/true, /*AllowExtraModuleMapSearch=*/true);
17991799
if (!clangModule) {
18001800
return false;
18011801
}
@@ -1872,8 +1872,8 @@ ModuleDecl *ClangImporter::Implementation::loadModuleClang(
18721872

18731873
// Look up the top-level module first, to see if it exists at all.
18741874
clang::Module *clangModule = clangHeaderSearch.lookupModule(
1875-
path.front().Item.str(), /*AllowSearch=*/true,
1876-
/*AllowExtraModuleMapSearch=*/true);
1875+
path.front().Item.str(), /*ImportLoc=*/clang::SourceLocation(),
1876+
/*AllowSearch=*/true, /*AllowExtraModuleMapSearch=*/true);
18771877
if (!clangModule)
18781878
return nullptr;
18791879

0 commit comments

Comments
 (0)