@@ -3036,21 +3036,9 @@ extension Driver {
3036
3036
3037
3037
// Emit-module discovered dependencies are always specified as a single-output
3038
3038
// file
3039
- if type == . emitModuleDependencies {
3040
- if let path = outputFileMap? . existingOutputForSingleInput ( outputType: type) {
3041
- return path
3042
- }
3043
-
3044
- // If an explicit path is not provided by the output file map, attempt to
3045
- // synthesize a path from the master swift dependency path. This is
3046
- // important as we may other emit this file at the location where the
3047
- // driver was invoked, which is normally the root of the package.
3048
- if let path = outputFileMap? . existingOutputForSingleInput ( outputType: . swiftDeps) {
3049
- return VirtualPath . lookup ( path)
3050
- . parentDirectory
3051
- . appending ( component: " \( moduleName) . \( type. rawValue) " )
3052
- . intern ( )
3053
- }
3039
+ if type == . emitModuleDependencies,
3040
+ let path = outputFileMap? . existingOutputForSingleInput ( outputType: type) {
3041
+ return path
3054
3042
}
3055
3043
3056
3044
// If there is an output argument, derive the name from there.
@@ -3068,6 +3056,16 @@ extension Driver {
3068
3056
. intern ( )
3069
3057
}
3070
3058
3059
+ // If an explicit path is not provided by the output file map, attempt to
3060
+ // synthesize a path from the master swift dependency path. This is
3061
+ // important as we may otherwise emit this file at the location where the
3062
+ // driver was invoked, which is normally the root of the package.
3063
+ if let path = outputFileMap? . existingOutputForSingleInput ( outputType: . swiftDeps) {
3064
+ return VirtualPath . lookup ( path)
3065
+ . parentDirectory
3066
+ . appending ( component: " \( moduleName) . \( type. rawValue) " )
3067
+ . intern ( )
3068
+ }
3071
3069
return try VirtualPath . intern ( path: moduleName. appendingFileTypeExtension ( type) )
3072
3070
}
3073
3071
0 commit comments