summaryrefslogtreecommitdiffstats
path: root/llvm/lib/IR/AsmWriter.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/IR/AsmWriter.cpp')
-rw-r--r--llvm/lib/IR/AsmWriter.cpp22
1 files changed, 4 insertions, 18 deletions
diff --git a/llvm/lib/IR/AsmWriter.cpp b/llvm/lib/IR/AsmWriter.cpp
index 5ec111869f0..ae9ab8d6187 100644
--- a/llvm/lib/IR/AsmWriter.cpp
+++ b/llvm/lib/IR/AsmWriter.cpp
@@ -2860,9 +2860,6 @@ void AssemblyWriter::printInstruction(const Instruction &I) {
writeOperand(LPI->getClause(i), true);
}
} else if (const auto *CPI = dyn_cast<CatchPadInst>(&I)) {
- Out << ' ';
- TypePrinter.print(I.getType(), Out);
-
Out << " [";
for (unsigned Op = 0, NumOps = CPI->getNumArgOperands(); Op < NumOps;
++Op) {
@@ -2888,9 +2885,6 @@ void AssemblyWriter::printInstruction(const Instruction &I) {
else
Out << "to caller";
} else if (const auto *CPI = dyn_cast<CleanupPadInst>(&I)) {
- Out << ' ';
- TypePrinter.print(I.getType(), Out);
-
Out << " [";
for (unsigned Op = 0, NumOps = CPI->getNumOperands(); Op < NumOps; ++Op) {
if (Op > 0)
@@ -2901,22 +2895,14 @@ void AssemblyWriter::printInstruction(const Instruction &I) {
} 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 << ' ';
+ writeOperand(CRI->getCatchPad(), /*PrintType=*/false);
Out << " to ";
writeOperand(CRI->getSuccessor(), /*PrintType=*/true);
} else if (const auto *CRI = dyn_cast<CleanupReturnInst>(&I)) {
- if (CRI->hasReturnValue()) {
- Out << ' ';
- writeOperand(CRI->getReturnValue(), /*PrintType=*/true);
- } else {
- Out << " void";
- }
+ Out << ' ';
+ writeOperand(CRI->getCleanupPad(), /*PrintType=*/false);
Out << " unwind ";
if (CRI->hasUnwindDest())
OpenPOWER on IntegriCloud