aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorDan Gohman <gohman@apple.com>2012-03-14 23:05:06 +0000
committerDan Gohman <gohman@apple.com>2012-03-14 23:05:06 +0000
commit8b11fdd8bb78840937ceebdfe44397dd8d2697fd (patch)
tree5945f329e54af25e443cbfcc238cef4776fa1bfe /lib
parent4ec692317bc38588d01edb7584953c9aca4a9467 (diff)
When an invoke is marked with metadata indicating its unwind edge
should be ignored by ARC optimization, don't insert new ARC runtime calls in the unwind destination. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152748 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r--lib/Transforms/Scalar/ObjCARC.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/Transforms/Scalar/ObjCARC.cpp b/lib/Transforms/Scalar/ObjCARC.cpp
index 91dc23c56a..529ea326a7 100644
--- a/lib/Transforms/Scalar/ObjCARC.cpp
+++ b/lib/Transforms/Scalar/ObjCARC.cpp
@@ -3041,7 +3041,8 @@ void ObjCARCOpt::MoveCalls(Value *Arg,
// but our releases will never depend on it, because they must be
// paired with retains from before the invoke.
InsertPts[0] = II->getNormalDest()->getFirstInsertionPt();
- InsertPts[1] = II->getUnwindDest()->getFirstInsertionPt();
+ if (!II->getMetadata(NoObjCARCExceptionsMDKind))
+ InsertPts[1] = II->getUnwindDest()->getFirstInsertionPt();
} else {
// Insert code immediately after the last use.
InsertPts[0] = llvm::next(BasicBlock::iterator(LastUse));