Skip to content

Commit 640c516

Browse files
committed
Update isTopLevelOutput predicate
sib, rawsib, imported modules, and index data are always top level bitcode is top-level if it's the compiler output type (in other words, it's not being embedded)
1 parent 308dd13 commit 640c516

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

Sources/SwiftDriver/Jobs/CompileJob.swift

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -59,15 +59,16 @@ extension Driver {
5959
/// Is this compile job top-level
6060
func isTopLevelOutput(type: FileType?) -> Bool {
6161
switch type {
62-
case .assembly, .sil, .raw_sil, .llvmIR, .ast, .jsonDependencies:
62+
case .assembly, .sil, .raw_sil, .llvmIR, .ast, .jsonDependencies, .sib, .raw_sib, .importedModules, .indexData:
6363
return true
6464
case .object:
6565
return (linkerOutputType == nil)
6666
case .swiftModule:
6767
return compilerMode.isSingleCompilation && moduleOutputInfo.output?.isTopLevel ?? false
68-
case .swift, .sib, .image, .dSYM, .dependencies, .autolink,
69-
.swiftDocumentation, .swiftInterface,
70-
.swiftSourceInfoFile, .raw_sib, .llvmBitcode, .diagnostics,
68+
case .llvmBitcode:
69+
return compilerOutputType == type
70+
case .swift, .image, .dSYM, .dependencies, .autolink,
71+
.swiftDocumentation, .swiftInterface, .swiftSourceInfoFile, .diagnostics,
7172
.objcHeader, .swiftDeps, .remap, .importedModules, .tbd, .moduleTrace,
7273
.indexData, .yamlOptimizationRecord, .bitstreamOptimizationRecord, .pcm,
7374
.pch, .clangModuleMap, .jsonTargetInfo, .jsonSwiftArtifacts, .jsonClangDependencies, nil:

0 commit comments

Comments
 (0)