Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[DO NOT MERGE] Print output file map #1713

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions Sources/SwiftDriver/Execution/ArgsResolver.swift
Original file line number Diff line number Diff line change
Expand Up @@ -170,17 +170,26 @@ public final class ArgsResolver {
// it sometimes outputs mappings in explicit block format (https://yaml.org/spec/1.2/spec.html#id2798057)
// and the frontend (llvm) only seems to support implicit block format.
try fileSystem.writeFileContents(absPath) { out in
var res = ""
for (input, map) in outputFileMap.entries {
out.send("\(quoteAndEscape(path: VirtualPath.lookup(input))):")
res += "\(quoteAndEscape(path: VirtualPath.lookup(input))):"
if map.isEmpty {
out.send(" {}\n")
res += " {}\n"
} else {
out.send("\n")
res += "\n"
for (type, output) in map {
out.send(" \(type.name): \(quoteAndEscape(path: VirtualPath.lookup(output)))\n")
res += " \(type.name): \(quoteAndEscape(path: VirtualPath.lookup(output)))\n"
}
}
}
print("""
\(absPath):
\(res)
""")
}
}
}
Expand Down