Add methods to print various SIL things with a SILPrintContext.

Use those methods to make the tests I added in #84811 work even
in non-asserts builds, since apparently printID does not.
This commit is contained in:
John McCall
2025-10-13 21:03:11 -04:00
parent 41f680cb93
commit 96afc1b00e
6 changed files with 70 additions and 53 deletions

View File

@@ -1145,7 +1145,7 @@ inline llvm::raw_ostream &operator<<(llvm::raw_ostream &OS, const SILModule &M){
void verificationFailure(const Twine &complaint,
const SILInstruction *atInstruction,
const SILArgument *atArgument,
llvm::function_ref<void(llvm::raw_ostream &OS)> extraContext);
llvm::function_ref<void(SILPrintContext &ctx)> extraContext);
inline bool SILOptions::supportsLexicalLifetimes(const SILModule &mod) const {
switch (mod.getStage()) {