mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
[Printer] Conditionally print Clang types in emitted SIL.
Hopefully, this helps us debug Clang type mismatches better.
This commit is contained in:
@@ -499,20 +499,19 @@ static bool emitSyntax(SourceFile *SF, StringRef OutputFilename) {
|
||||
}
|
||||
|
||||
/// Writes SIL out to the given file.
|
||||
static bool writeSIL(SILModule &SM, ModuleDecl *M, bool EmitVerboseSIL,
|
||||
StringRef OutputFilename, bool SortSIL) {
|
||||
static bool writeSIL(SILModule &SM, ModuleDecl *M, const SILOptions &Opts,
|
||||
StringRef OutputFilename) {
|
||||
auto OS = getFileOutputStream(OutputFilename, M->getASTContext());
|
||||
if (!OS) return true;
|
||||
SM.print(*OS, EmitVerboseSIL, M, SortSIL);
|
||||
SM.print(*OS, M, Opts);
|
||||
|
||||
return M->getASTContext().hadError();
|
||||
}
|
||||
|
||||
static bool writeSIL(SILModule &SM, const PrimarySpecificPaths &PSPs,
|
||||
const CompilerInstance &Instance,
|
||||
const SILOptions &opts) {
|
||||
return writeSIL(SM, Instance.getMainModule(), opts.EmitVerboseSIL,
|
||||
PSPs.OutputFilename, opts.EmitSortedSIL);
|
||||
const SILOptions &Opts) {
|
||||
return writeSIL(SM, Instance.getMainModule(), Opts, PSPs.OutputFilename);
|
||||
}
|
||||
|
||||
/// Prints the Objective-C "generated header" interface for \p M to \p
|
||||
|
||||
Reference in New Issue
Block a user