summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/CGObjC.cpp
diff options
context:
space:
mode:
authorJohn McCall <rjmccall@apple.com>2011-07-12 20:27:29 +0000
committerJohn McCall <rjmccall@apple.com>2011-07-12 20:27:29 +0000
commit30317fda63655fe3e2bac2b1d8ff5de3d5f0f9a3 (patch)
treefe10b206328556a3b69fe30046c3cab8dd824ca4 /clang/lib/CodeGen/CGObjC.cpp
parent77b0e7f2969ab69d72fe3908acfec27cdb9d65e5 (diff)
downloadbcm5719-llvm-30317fda63655fe3e2bac2b1d8ff5de3d5f0f9a3.tar.gz
bcm5719-llvm-30317fda63655fe3e2bac2b1d8ff5de3d5f0f9a3.zip
Generalize Cleanup::Emit's "isForEH" parameter into a set
of flags. No functionality change. llvm-svn: 134997
Diffstat (limited to 'clang/lib/CodeGen/CGObjC.cpp')
-rw-r--r--clang/lib/CodeGen/CGObjC.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/clang/lib/CodeGen/CGObjC.cpp b/clang/lib/CodeGen/CGObjC.cpp
index 05f5f4caa79..f64ff9766f9 100644
--- a/clang/lib/CodeGen/CGObjC.cpp
+++ b/clang/lib/CodeGen/CGObjC.cpp
@@ -218,7 +218,7 @@ RValue CodeGenFunction::EmitObjCMessageExpr(const ObjCMessageExpr *E,
namespace {
struct FinishARCDealloc : EHScopeStack::Cleanup {
- void Emit(CodeGenFunction &CGF, bool isForEH) {
+ void Emit(CodeGenFunction &CGF, Flags flags) {
const ObjCMethodDecl *method = cast<ObjCMethodDecl>(CGF.CurCodeDecl);
const ObjCImplementationDecl *impl
= cast<ObjCImplementationDecl>(method->getDeclContext());
@@ -691,11 +691,11 @@ namespace {
: addr(addr), ivar(ivar), destroyer(*destroyer),
useEHCleanupForArray(useEHCleanupForArray) {}
- void Emit(CodeGenFunction &CGF, bool isForEH) {
+ void Emit(CodeGenFunction &CGF, Flags flags) {
LValue lvalue
= CGF.EmitLValueForIvar(CGF.TypeOfSelfObject(), addr, ivar, /*CVR*/ 0);
CGF.emitDestroy(lvalue.getAddress(), ivar->getType(), destroyer,
- !isForEH && useEHCleanupForArray);
+ flags.isForNormalCleanup() && useEHCleanupForArray);
}
};
}
@@ -1213,7 +1213,7 @@ namespace {
llvm::Value *ptr;
llvm::Value *condition;
- void Emit(CodeGenFunction &CGF, bool forEH) {
+ void Emit(CodeGenFunction &CGF, Flags flags) {
llvm::Value *object;
// If we're in a conditional branch, we had to stash away in an
@@ -1802,7 +1802,7 @@ namespace {
CallObjCAutoreleasePoolObject(llvm::Value *token) : Token(token) {}
- void Emit(CodeGenFunction &CGF, bool isForEH) {
+ void Emit(CodeGenFunction &CGF, Flags flags) {
CGF.EmitObjCAutoreleasePoolPop(Token);
}
};
@@ -1811,7 +1811,7 @@ namespace {
CallObjCMRRAutoreleasePoolObject(llvm::Value *token) : Token(token) {}
- void Emit(CodeGenFunction &CGF, bool isForEH) {
+ void Emit(CodeGenFunction &CGF, Flags flags) {
CGF.EmitObjCMRRAutoreleasePoolPop(Token);
}
};
OpenPOWER on IntegriCloud