@@ -1779,7 +1779,7 @@ ModuleDecl *ClangImporter::Implementation::loadModuleClang(
17791779 if (!clangModule)
17801780 return nullptr ;
17811781
1782- return finishLoadingClangModule (importLoc, clangModule );
1782+ return finishLoadingClangModule (clangModule, importLoc );
17831783}
17841784
17851785ModuleDecl *
@@ -1799,7 +1799,7 @@ ModuleDecl *ClangImporter::Implementation::loadModule(
17991799}
18001800
18011801ModuleDecl *ClangImporter::Implementation::finishLoadingClangModule (
1802- SourceLoc importLoc, const clang::Module *clangModule) {
1802+ const clang::Module *clangModule, SourceLoc importLoc ) {
18031803 assert (clangModule);
18041804
18051805 // Bump the generation count.
@@ -1841,7 +1841,7 @@ ModuleDecl *ClangImporter::Implementation::finishLoadingClangModule(
18411841 }
18421842
18431843 if (clangModule->isSubModule ()) {
1844- finishLoadingClangModule (importLoc, clangModule->getTopLevelModule ());
1844+ finishLoadingClangModule (clangModule->getTopLevelModule (), importLoc );
18451845 } else {
18461846 ModuleDecl *&loaded = SwiftContext.LoadedModules [result->getName ()];
18471847 if (!loaded)
@@ -1871,7 +1871,7 @@ void ClangImporter::Implementation::handleDeferredImports(SourceLoc diagLoc) {
18711871 // officially supported with bridging headers: app targets and unit tests
18721872 // only. Unfortunately that's not enforced.
18731873 for (size_t i = 0 ; i < ImportedHeaderExports.size (); ++i) {
1874- (void )finishLoadingClangModule (diagLoc, ImportedHeaderExports[i]);
1874+ (void )finishLoadingClangModule (ImportedHeaderExports[i], diagLoc );
18751875 }
18761876}
18771877
@@ -2012,7 +2012,7 @@ ClangImporter::Implementation::~Implementation() {
20122012}
20132013
20142014ClangModuleUnit *ClangImporter::Implementation::getWrapperForModule (
2015- const clang::Module *underlying) {
2015+ const clang::Module *underlying, SourceLoc diagLoc ) {
20162016 auto &cacheEntry = ModuleWrappers[underlying];
20172017 if (ClangModuleUnit *cached = cacheEntry.getPointer ())
20182018 return cached;
@@ -2027,7 +2027,7 @@ ClangModuleUnit *ClangImporter::Implementation::getWrapperForModule(
20272027 auto file = new (SwiftContext) ClangModuleUnit (*wrapper, *this ,
20282028 underlying);
20292029 wrapper->addFile (*file);
2030- SwiftContext.getClangModuleLoader ()->findOverlayFiles (SourceLoc () , wrapper, file);
2030+ SwiftContext.getClangModuleLoader ()->findOverlayFiles (diagLoc , wrapper, file);
20312031 cacheEntry.setPointer (file);
20322032
20332033 return file;
0 commit comments