diff options
Diffstat (limited to 'llvm/lib/IR/AsmWriter.cpp')
-rw-r--r-- | llvm/lib/IR/AsmWriter.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/llvm/lib/IR/AsmWriter.cpp b/llvm/lib/IR/AsmWriter.cpp index 9ce384825f4..5ec111869f0 100644 --- a/llvm/lib/IR/AsmWriter.cpp +++ b/llvm/lib/IR/AsmWriter.cpp @@ -2900,6 +2900,16 @@ void AssemblyWriter::printInstruction(const Instruction &I) { Out << "]"; } else if (isa<ReturnInst>(I) && !Operand) { Out << " void"; + } else if (const auto *CRI = dyn_cast<CatchReturnInst>(&I)) { + if (CRI->hasReturnValue()) { + Out << ' '; + writeOperand(CRI->getReturnValue(), /*PrintType=*/true); + } else { + Out << " void"; + } + + Out << " to "; + writeOperand(CRI->getSuccessor(), /*PrintType=*/true); } else if (const auto *CRI = dyn_cast<CleanupReturnInst>(&I)) { if (CRI->hasReturnValue()) { Out << ' '; |