summaryrefslogtreecommitdiff
path: root/include/llvm/Support
diff options
context:
space:
mode:
authorBill Wendling <isanbard@gmail.com>2011-07-31 06:30:59 +0000
committerBill Wendling <isanbard@gmail.com>2011-07-31 06:30:59 +0000
commitdccc03b2423fe65efb5963ae816b99c24fc53374 (patch)
treeada265d222c45b8fe4d227796f9566538e540e3f /include/llvm/Support
parent6762dc1fb38f7579b33143c80f057319e1537678 (diff)
downloadllvm-dccc03b2423fe65efb5963ae816b99c24fc53374.tar.gz
llvm-dccc03b2423fe65efb5963ae816b99c24fc53374.tar.bz2
llvm-dccc03b2423fe65efb5963ae816b99c24fc53374.tar.xz
Add the 'resume' instruction for the new EH rewrite.
This adds the 'resume' instruction class, IR parsing, and bitcode reading and writing. The 'resume' instruction resumes propagation of an existing (in-flight) exception whose unwinding was interrupted with a 'landingpad' instruction (to be added later). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136589 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/Support')
-rw-r--r--include/llvm/Support/IRBuilder.h4
-rw-r--r--include/llvm/Support/InstVisitor.h1
2 files changed, 5 insertions, 0 deletions
diff --git a/include/llvm/Support/IRBuilder.h b/include/llvm/Support/IRBuilder.h
index 87a017d400..01244b8bc4 100644
--- a/include/llvm/Support/IRBuilder.h
+++ b/include/llvm/Support/IRBuilder.h
@@ -479,6 +479,10 @@ public:
return Insert(new UnwindInst(Context));
}
+ ResumeInst *CreateResume(Value *Exn) {
+ return Insert(ResumeInst::Create(Exn));
+ }
+
UnreachableInst *CreateUnreachable() {
return Insert(new UnreachableInst(Context));
}
diff --git a/include/llvm/Support/InstVisitor.h b/include/llvm/Support/InstVisitor.h
index dc29d6a23a..591de6f40d 100644
--- a/include/llvm/Support/InstVisitor.h
+++ b/include/llvm/Support/InstVisitor.h
@@ -163,6 +163,7 @@ public:
RetTy visitIndirectBrInst(IndirectBrInst &I) { DELEGATE(TerminatorInst);}
RetTy visitInvokeInst(InvokeInst &I) { DELEGATE(TerminatorInst);}
RetTy visitUnwindInst(UnwindInst &I) { DELEGATE(TerminatorInst);}
+ RetTy visitResumeInst(ResumeInst &I) { DELEGATE(TerminatorInst);}
RetTy visitUnreachableInst(UnreachableInst &I) { DELEGATE(TerminatorInst);}
RetTy visitICmpInst(ICmpInst &I) { DELEGATE(CmpInst);}
RetTy visitFCmpInst(FCmpInst &I) { DELEGATE(CmpInst);}