[Printer] Conditionally print Clang types in emitted SIL.

Hopefully, this helps us debug Clang type mismatches better.
This commit is contained in:
Varun Gandhi
2020-01-15 16:15:44 -08:00
parent 5f45820755
commit a27c5f0a16
15 changed files with 86 additions and 37 deletions

View File

@@ -647,10 +647,11 @@ public:
/// \param ShouldSort If set to true sorts functions, vtables, sil global
/// variables, and witness tables by name to ease diffing.
/// \param PrintASTDecls If set to true print AST decls.
void print(raw_ostream &OS, bool Verbose = false,
ModuleDecl *M = nullptr, bool ShouldSort = false,
void print(raw_ostream &OS,
ModuleDecl *M = nullptr,
const SILOptions &Opts = SILOptions(),
bool PrintASTDecls = true) const {
SILPrintContext PrintCtx(OS, Verbose, ShouldSort);
SILPrintContext PrintCtx(OS, Opts);
print(PrintCtx, M, PrintASTDecls);
}