summaryrefslogtreecommitdiff
path: root/lib/Transforms
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2003-08-24 12:24:11 +0000
committerChris Lattner <sabre@nondot.org>2003-08-24 12:24:11 +0000
commit657fbe68b8720d3a2644a51d2845bd79fdc5f013 (patch)
tree5f065de71d271cc48ca9f26dcecc124218d0d48f /lib/Transforms
parent101d40060c6041a84f5460bb16475f9f03fd140d (diff)
downloadllvm-657fbe68b8720d3a2644a51d2845bd79fdc5f013.tar.gz
llvm-657fbe68b8720d3a2644a51d2845bd79fdc5f013.tar.bz2
llvm-657fbe68b8720d3a2644a51d2845bd79fdc5f013.tar.xz
rethrow is really the language independent primitive here. "throw" can be written
in terms of it and llvm.exc.setcurrent. Rework the intrinsics. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8111 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms')
-rw-r--r--lib/Transforms/Utils/InlineFunction.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/lib/Transforms/Utils/InlineFunction.cpp b/lib/Transforms/Utils/InlineFunction.cpp
index fade863bb8..017fbe1cca 100644
--- a/lib/Transforms/Utils/InlineFunction.cpp
+++ b/lib/Transforms/Utils/InlineFunction.cpp
@@ -191,12 +191,12 @@ bool InlineFunction(CallSite CS) {
if (Function *F = CI->getCalledFunction())
if (unsigned ID = F->getIntrinsicID())
- if (ID == LLVMIntrinsic::exc_rethrow) {
- // llvm.exc.rethrow requires special handling when it gets
- // inlined into an invoke site. Once this happens, we know that
- // the rethrow would cause a control transfer to the invoke
- // exception destination, so we can transform it into a direct
- // branch to the exception destination.
+ if (ID == LLVMIntrinsic::unwind) {
+ // llvm.unwind requires special handling when it gets inlined
+ // into an invoke site. Once this happens, we know that the
+ // unwind would cause a control transfer to the invoke exception
+ // destination, so we can transform it into a direct branch to
+ // the exception destination.
BranchInst *BI = new BranchInst(InvokeDest, CI);
// Note that since any instructions after the rethrow/branch are
@@ -211,7 +211,7 @@ bool InlineFunction(CallSite CS) {
}
break; // Done with this basic block!
- } else if (ID == LLVMIntrinsic::exc_throw ||
+ } else if (ID == LLVMIntrinsic::exc_setcurrent ||
ID == LLVMIntrinsic::exc_getcurrent) {
ShouldInvokify = false; // Not correct to invokify exc.throw!
}