From: Peter Collingbourne Date: Mon, 28 Nov 2011 04:29:10 +0000 (+0000) Subject: Another silly workaround for MSVC. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=5c00fc309bec8900a798e7d5f87d1ccab7908a28;p=clang Another silly workaround for MSVC. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@145227 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/CodeGen/CGCleanup.cpp b/lib/CodeGen/CGCleanup.cpp index c3eb2c67bc..308409dbb6 100644 --- a/lib/CodeGen/CGCleanup.cpp +++ b/lib/CodeGen/CGCleanup.cpp @@ -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); }