summaryrefslogtreecommitdiff
path: root/lib/CodeGen/ShadowStackGC.cpp
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 /lib/CodeGen/ShadowStackGC.cpp
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 'lib/CodeGen/ShadowStackGC.cpp')
-rw-r--r--lib/CodeGen/ShadowStackGC.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/CodeGen/ShadowStackGC.cpp b/lib/CodeGen/ShadowStackGC.cpp
index 9807c8cb27..daab89b8f2 100644
--- a/lib/CodeGen/ShadowStackGC.cpp
+++ b/lib/CodeGen/ShadowStackGC.cpp
@@ -113,9 +113,11 @@ namespace {
while (StateBB != StateE) {
BasicBlock *CurBB = StateBB++;
- // Branches and invokes do not escape, only unwind and return do.
+ // Branches and invokes do not escape, only unwind, resume, and return
+ // do.
TerminatorInst *TI = CurBB->getTerminator();
- if (!isa<UnwindInst>(TI) && !isa<ReturnInst>(TI))
+ if (!isa<UnwindInst>(TI) && !isa<ReturnInst>(TI) &&
+ !isa<ResumeInst>(TI))
continue;
Builder.SetInsertPoint(TI->getParent(), TI);