summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/CGExpr.cpp
diff options
context:
space:
mode:
authorPeter Collingbourne <peter@pcc.me.uk>2012-01-26 03:33:36 +0000
committerPeter Collingbourne <peter@pcc.me.uk>2012-01-26 03:33:36 +0000
commit1425b4556a9b97e5b1cbca441ee08bee151fdb9f (patch)
treed92aaf0875a9a08e9c3d938191d4194f51f99aed /clang/lib/CodeGen/CGExpr.cpp
parente67bb67a9b8986411683269d6520b49ad339d32f (diff)
downloadbcm5719-llvm-1425b4556a9b97e5b1cbca441ee08bee151fdb9f.tar.gz
bcm5719-llvm-1425b4556a9b97e5b1cbca441ee08bee151fdb9f.zip
Use function pointers, rather than references, to pass Destroyers
around, in the process cleaning up the various gcc/msvc compiler workarounds. llvm-svn: 149036
Diffstat (limited to 'clang/lib/CodeGen/CGExpr.cpp')
-rw-r--r--clang/lib/CodeGen/CGExpr.cpp10
1 files changed, 3 insertions, 7 deletions
diff --git a/clang/lib/CodeGen/CGExpr.cpp b/clang/lib/CodeGen/CGExpr.cpp
index 41fbb836b5c..0e19a4015af 100644
--- a/clang/lib/CodeGen/CGExpr.cpp
+++ b/clang/lib/CodeGen/CGExpr.cpp
@@ -487,21 +487,17 @@ CodeGenFunction::EmitReferenceBindingToExpr(const Expr *E,
case Qualifiers::OCL_Strong: {
bool precise = VD && VD->hasAttr<ObjCPreciseLifetimeAttr>();
CleanupKind cleanupKind = getARCCleanupKind();
- // This local is a GCC and MSVC compiler workaround.
- Destroyer *destroyer = precise ? &destroyARCStrongPrecise :
- &destroyARCStrongImprecise;
pushDestroy(cleanupKind, ReferenceTemporary, ObjCARCReferenceLifetimeType,
- *destroyer, cleanupKind & EHCleanup);
+ precise ? destroyARCStrongPrecise : destroyARCStrongImprecise,
+ cleanupKind & EHCleanup);
break;
}
case Qualifiers::OCL_Weak: {
- // This local is a GCC and MSVC compiler workaround.
- Destroyer *destroyer = &destroyARCWeak;
// __weak objects always get EH cleanups; otherwise, exceptions
// could cause really nasty crashes instead of mere leaks.
pushDestroy(NormalAndEHCleanup, ReferenceTemporary,
- ObjCARCReferenceLifetimeType, *destroyer, true);
+ ObjCARCReferenceLifetimeType, destroyARCWeak, true);
break;
}
}
OpenPOWER on IntegriCloud