diff options
| author | Dan Gohman <gohman@apple.com> | 2012-03-14 23:05:06 +0000 |
|---|---|---|
| committer | Dan Gohman <gohman@apple.com> | 2012-03-14 23:05:06 +0000 |
| commit | 532fb8131bfbacd60130c3ddcce9051b2674845c (patch) | |
| tree | 28dcc5d051d758d376fe7d9bbc62a69aab81a843 /llvm/lib/Transforms | |
| parent | baf68ffcf88bd46c6821e3c608d51db2ee999a21 (diff) | |
| download | bcm5719-llvm-532fb8131bfbacd60130c3ddcce9051b2674845c.tar.gz bcm5719-llvm-532fb8131bfbacd60130c3ddcce9051b2674845c.zip | |
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.
llvm-svn: 152748
Diffstat (limited to 'llvm/lib/Transforms')
| -rw-r--r-- | llvm/lib/Transforms/Scalar/ObjCARC.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/lib/Transforms/Scalar/ObjCARC.cpp b/llvm/lib/Transforms/Scalar/ObjCARC.cpp index 91dc23c56a8..529ea326a75 100644 --- a/llvm/lib/Transforms/Scalar/ObjCARC.cpp +++ b/llvm/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)); |

