summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/CGObjC.cpp
diff options
context:
space:
mode:
authorJohn McCall <rjmccall@apple.com>2013-04-16 21:29:40 +0000
committerJohn McCall <rjmccall@apple.com>2013-04-16 21:29:40 +0000
commitb7ff6db3b15ebb463ee53d552a6c1bba73a9d7c5 (patch)
treeeff8a9ee0699ccf9ef15db438e5beaff65952af7 /clang/lib/CodeGen/CGObjC.cpp
parentd17c3dc60ffe5fc6d2a06a88e3534e4f498bec19 (diff)
downloadbcm5719-llvm-b7ff6db3b15ebb463ee53d552a6c1bba73a9d7c5.tar.gz
bcm5719-llvm-b7ff6db3b15ebb463ee53d552a6c1bba73a9d7c5.zip
objc_autoreleasePoolPop() can throw if a -dealloc does.
Model it as throwing so that the exception can be caught. This is generally not expected to have significant code-size impact because the contents of the @autoreleasepool block are very likely to contain a call, very likely at the same cleanup level as the @autoreleasepool itself. rdar://13660038 llvm-svn: 179630
Diffstat (limited to 'clang/lib/CodeGen/CGObjC.cpp')
-rw-r--r--clang/lib/CodeGen/CGObjC.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/clang/lib/CodeGen/CGObjC.cpp b/clang/lib/CodeGen/CGObjC.cpp
index 79d97b99b40..3338b336070 100644
--- a/clang/lib/CodeGen/CGObjC.cpp
+++ b/clang/lib/CodeGen/CGObjC.cpp
@@ -21,6 +21,7 @@
#include "clang/AST/StmtObjC.h"
#include "clang/Basic/Diagnostic.h"
#include "llvm/ADT/STLExtras.h"
+#include "llvm/Support/CallSite.h"
#include "llvm/IR/DataLayout.h"
#include "llvm/IR/InlineAsm.h"
using namespace clang;
@@ -2256,7 +2257,8 @@ void CodeGenFunction::EmitObjCAutoreleasePoolPop(llvm::Value *value) {
fn = createARCRuntimeFunction(CGM, fnType, "objc_autoreleasePoolPop");
}
- EmitNounwindRuntimeCall(fn, value);
+ // objc_autoreleasePoolPop can throw.
+ EmitRuntimeCallOrInvoke(fn, value);
}
/// Produce the code to do an MRR version objc_autoreleasepool_push.
OpenPOWER on IntegriCloud