summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/CGDecl.cpp
diff options
context:
space:
mode:
authorJohn McCall <rjmccall@apple.com>2011-07-09 02:30:03 +0000
committerJohn McCall <rjmccall@apple.com>2011-07-09 02:30:03 +0000
commit7c4df104ce5e22bb8c475f181e07cc16428e2695 (patch)
treecf608c33edef1639a5a651fe24b3f9e5907fed7d /clang/lib/CodeGen/CGDecl.cpp
parent82fe67bb827655aae994e58c4ae0a98be42c94d6 (diff)
downloadbcm5719-llvm-7c4df104ce5e22bb8c475f181e07cc16428e2695.tar.gz
bcm5719-llvm-7c4df104ce5e22bb8c475f181e07cc16428e2695.zip
GCC 4.2 compatibility hack.
llvm-svn: 134785
Diffstat (limited to 'clang/lib/CodeGen/CGDecl.cpp')
-rw-r--r--clang/lib/CodeGen/CGDecl.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/clang/lib/CodeGen/CGDecl.cpp b/clang/lib/CodeGen/CGDecl.cpp
index 5ce7b3374e9..3d9691d20a3 100644
--- a/clang/lib/CodeGen/CGDecl.cpp
+++ b/clang/lib/CodeGen/CGDecl.cpp
@@ -1099,11 +1099,12 @@ void CodeGenFunction::EmitAutoVarCleanups(const AutoVarEmission &emission) {
CodeGenFunction::Destroyer &
CodeGenFunction::getDestroyer(QualType::DestructionKind kind) {
+ // GCC 4.2 requires the *& on these function references.
switch (kind) {
case QualType::DK_none: llvm_unreachable("no destroyer for trivial dtor");
- case QualType::DK_cxx_destructor: return destroyCXXObject;
- case QualType::DK_objc_strong_lifetime: return destroyARCStrongPrecise;
- case QualType::DK_objc_weak_lifetime: return destroyARCWeak;
+ case QualType::DK_cxx_destructor: return *&destroyCXXObject;
+ case QualType::DK_objc_strong_lifetime: return *&destroyARCStrongPrecise;
+ case QualType::DK_objc_weak_lifetime: return *&destroyARCWeak;
}
}
OpenPOWER on IntegriCloud