@@ -1779,7 +1779,7 @@ ModuleDecl *ClangImporter::Implementation::loadModuleClang(
1779
1779
if (!clangModule)
1780
1780
return nullptr ;
1781
1781
1782
- return finishLoadingClangModule (importLoc, clangModule );
1782
+ return finishLoadingClangModule (clangModule, importLoc );
1783
1783
}
1784
1784
1785
1785
ModuleDecl *
@@ -1799,7 +1799,7 @@ ModuleDecl *ClangImporter::Implementation::loadModule(
1799
1799
}
1800
1800
1801
1801
ModuleDecl *ClangImporter::Implementation::finishLoadingClangModule (
1802
- SourceLoc importLoc, const clang::Module *clangModule) {
1802
+ const clang::Module *clangModule, SourceLoc importLoc ) {
1803
1803
assert (clangModule);
1804
1804
1805
1805
// Bump the generation count.
@@ -1841,7 +1841,7 @@ ModuleDecl *ClangImporter::Implementation::finishLoadingClangModule(
1841
1841
}
1842
1842
1843
1843
if (clangModule->isSubModule ()) {
1844
- finishLoadingClangModule (importLoc, clangModule->getTopLevelModule ());
1844
+ finishLoadingClangModule (clangModule->getTopLevelModule (), importLoc );
1845
1845
} else {
1846
1846
ModuleDecl *&loaded = SwiftContext.LoadedModules [result->getName ()];
1847
1847
if (!loaded)
@@ -1871,7 +1871,7 @@ void ClangImporter::Implementation::handleDeferredImports(SourceLoc diagLoc) {
1871
1871
// officially supported with bridging headers: app targets and unit tests
1872
1872
// only. Unfortunately that's not enforced.
1873
1873
for (size_t i = 0 ; i < ImportedHeaderExports.size (); ++i) {
1874
- (void )finishLoadingClangModule (diagLoc, ImportedHeaderExports[i]);
1874
+ (void )finishLoadingClangModule (ImportedHeaderExports[i], diagLoc );
1875
1875
}
1876
1876
}
1877
1877
@@ -2012,7 +2012,7 @@ ClangImporter::Implementation::~Implementation() {
2012
2012
}
2013
2013
2014
2014
ClangModuleUnit *ClangImporter::Implementation::getWrapperForModule (
2015
- const clang::Module *underlying) {
2015
+ const clang::Module *underlying, SourceLoc diagLoc ) {
2016
2016
auto &cacheEntry = ModuleWrappers[underlying];
2017
2017
if (ClangModuleUnit *cached = cacheEntry.getPointer ())
2018
2018
return cached;
@@ -2027,7 +2027,7 @@ ClangModuleUnit *ClangImporter::Implementation::getWrapperForModule(
2027
2027
auto file = new (SwiftContext) ClangModuleUnit (*wrapper, *this ,
2028
2028
underlying);
2029
2029
wrapper->addFile (*file);
2030
- SwiftContext.getClangModuleLoader ()->findOverlayFiles (SourceLoc () , wrapper, file);
2030
+ SwiftContext.getClangModuleLoader ()->findOverlayFiles (diagLoc , wrapper, file);
2031
2031
cacheEntry.setPointer (file);
2032
2032
2033
2033
return file;
0 commit comments