diff options
author | John McCall <rjmccall@apple.com> | 2011-07-09 02:30:03 +0000 |
---|---|---|
committer | John McCall <rjmccall@apple.com> | 2011-07-09 02:30:03 +0000 |
commit | 7566aa2e47c2452f06cd59917748299065e83607 (patch) | |
tree | 55d151fb805a069fccec39f72aa5731d4e2005c4 /lib/CodeGen/CGDecl.cpp | |
parent | bdc4d80956c83a486e58d3df6bb524a1f66ff574 (diff) |
GCC 4.2 compatibility hack.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@134785 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CGDecl.cpp')
-rw-r--r-- | lib/CodeGen/CGDecl.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/CodeGen/CGDecl.cpp b/lib/CodeGen/CGDecl.cpp index 5ce7b3374e..3d9691d20a 100644 --- a/lib/CodeGen/CGDecl.cpp +++ b/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; } } |