[cfe-commits] r134785 - /cfe/trunk/lib/CodeGen/CGDecl.cpp

John McCall rjmccall at apple.com
Fri Jul 8 19:30:03 PDT 2011


Author: rjmccall
Date: Fri Jul  8 21:30:03 2011
New Revision: 134785

URL: http://llvm.org/viewvc/llvm-project?rev=134785&view=rev
Log:
GCC 4.2 compatibility hack.


Modified:
    cfe/trunk/lib/CodeGen/CGDecl.cpp

Modified: cfe/trunk/lib/CodeGen/CGDecl.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGDecl.cpp?rev=134785&r1=134784&r2=134785&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CGDecl.cpp (original)
+++ cfe/trunk/lib/CodeGen/CGDecl.cpp Fri Jul  8 21:30:03 2011
@@ -1099,11 +1099,12 @@
 
 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;
   }
 }
 





More information about the cfe-commits mailing list