Skip to content

Commit 2564fff

Browse files
committed
[Dependency Scanning] Do not specify '-fmodule-map-file' inputs on Swift interface dependency compilation jobs
Swift interfaces will only ever query module inputs by-name, so parsing modulemap files to resolve their headers is not necessary.
1 parent 8e72a01 commit 2564fff

File tree

2 files changed

+2
-9
lines changed

2 files changed

+2
-9
lines changed

lib/DependencyScan/ScanDependencies.cpp

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -278,13 +278,6 @@ static llvm::Error resolveExplicitModuleInputs(
278278
commandLine.push_back("-Xcc");
279279
commandLine.push_back("-fmodule-file=" + depModuleID.ModuleName + "=" +
280280
clangDepDetails->mappedPCMPath);
281-
if (!instance.getInvocation()
282-
.getClangImporterOptions()
283-
.UseClangIncludeTree) {
284-
commandLine.push_back("-Xcc");
285-
commandLine.push_back("-fmodule-map-file=" +
286-
remapPath(clangDepDetails->moduleMapFile));
287-
}
288281
}
289282
if (!clangDepDetails->moduleCacheKey.empty()) {
290283
commandLine.push_back("-Xcc");

test/ScanDependencies/explicit-swift-dependencies.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,5 +51,5 @@ import F
5151
// CHECK-NEXT: "{{.*}}{{/|\\}}F-{{.*}}.swiftmodule"
5252
// CHECK-DAG: "-swift-module-file=Swift={{.*}}{{/|\\}}Swift-{{.*}}.swiftmodule"
5353
// CHECK-DAG: "-swift-module-file=SwiftOnoneSupport={{.*}}{{/|\\}}SwiftOnoneSupport-{{.*}}.swiftmodule"
54-
// CHECK-DAG: "-fmodule-file=F={{.*}}{{/|\\}}F-{{.*}}.pcm",
55-
// CHECK-DAG: "-fmodule-file=SwiftShims={{.*}}{{/|\\}}SwiftShims-{{.*}}.pcm",
54+
// CHECK-DAG: "-fmodule-file=F={{.*}}{{/|\\}}F-{{.*}}.pcm"
55+
// CHECK-DAG: "-fmodule-file=SwiftShims={{.*}}{{/|\\}}SwiftShims-{{.*}}.pcm"

0 commit comments

Comments
 (0)