summaryrefslogtreecommitdiffstats
path: root/llvm/lib/VMCore/AsmWriter.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/VMCore/AsmWriter.cpp')
-rw-r--r--llvm/lib/VMCore/AsmWriter.cpp30
1 files changed, 30 insertions, 0 deletions
diff --git a/llvm/lib/VMCore/AsmWriter.cpp b/llvm/lib/VMCore/AsmWriter.cpp
index 1f8e89173c7..e6cd418c321 100644
--- a/llvm/lib/VMCore/AsmWriter.cpp
+++ b/llvm/lib/VMCore/AsmWriter.cpp
@@ -1710,6 +1710,9 @@ void AssemblyWriter::printInstruction(const Instruction &I) {
writeOperand(I.getOperand(i), true);
}
Out << ']';
+ } else if (isa<ResumeInst>(I)) {
+ Out << ' ';
+ writeOperand(Operand, true);
} else if (const PHINode *PN = dyn_cast<PHINode>(&I)) {
Out << ' ';
TypePrinter.print(I.getType(), Out);
@@ -1732,6 +1735,33 @@ void AssemblyWriter::printInstruction(const Instruction &I) {
writeOperand(I.getOperand(1), true);
for (const unsigned *i = IVI->idx_begin(), *e = IVI->idx_end(); i != e; ++i)
Out << ", " << *i;
+ } else if (const LandingPadInst *LPI = dyn_cast<LandingPadInst>(&I)) {
+ Out << ' ';
+ TypePrinter.print(I.getType(), Out);
+ Out << " personality ";
+ writeOperand(LPI->getPersonalityFn(), true); Out << '\n';
+
+ if (LPI->isCleanup())
+ Out << " cleanup";
+
+ for (unsigned i = 0, e = LPI->getNumClauses(); i != e; ) {
+ if (i != 0 || LPI->isCleanup()) Out << "\n";
+
+ SmallVector<const Value*, 8> Vals;
+ LandingPadInst::ClauseType CT = LPI->getClauseType(i);
+ for (; i != e && LPI->getClauseType(i) == CT; ++i)
+ Vals.push_back(LPI->getClauseValue(i));
+
+ if (CT == LandingPadInst::Catch)
+ Out << " catch ";
+ else
+ Out << " filter ";
+
+ for (unsigned II = 0, IE = Vals.size(); II != IE; ++II) {
+ if (II != 0) Out << ", ";
+ writeOperand(Vals[II], true);
+ }
+ }
} else if (isa<ReturnInst>(I) && !Operand) {
Out << " void";
} else if (const CallInst *CI = dyn_cast<CallInst>(&I)) {
OpenPOWER on IntegriCloud