]> granicus.if.org Git - clang/commitdiff
Another silly workaround for MSVC.
authorPeter Collingbourne <peter@pcc.me.uk>
Mon, 28 Nov 2011 04:29:10 +0000 (04:29 +0000)
committerPeter Collingbourne <peter@pcc.me.uk>
Mon, 28 Nov 2011 04:29:10 +0000 (04:29 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@145227 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/CGCleanup.cpp

index c3eb2c67bc8a3bc0d6d47d23bf9b826aebf01ec0..308409dbb63f41971689496af209d14f8b9d61d9 100644 (file)
@@ -1099,6 +1099,8 @@ llvm::Value *CodeGenFunction::getNormalCleanupDestSlot() {
 void CodeGenFunction::EmitCXXTemporary(const CXXTemporary *Temporary,
                                        QualType TempType,
                                        llvm::Value *Ptr) {
-  pushDestroy(NormalAndEHCleanup, Ptr, TempType, *&destroyCXXObject,
+  // This local is a GCC and MSVC compiler workaround.
+  Destroyer *destroyer = &destroyCXXObject;
+  pushDestroy(NormalAndEHCleanup, Ptr, TempType, *destroyer,
               /*useEHCleanup*/ true);
 }