aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/CGCleanup.cpp
diff options
context:
space:
mode:
authorPeter Collingbourne <peter@pcc.me.uk>2011-11-28 04:29:10 +0000
committerPeter Collingbourne <peter@pcc.me.uk>2011-11-28 04:29:10 +0000
commit5c00fc309bec8900a798e7d5f87d1ccab7908a28 (patch)
tree8218edfabe6f658a758fca00a90ce0bc1729ff31 /lib/CodeGen/CGCleanup.cpp
parent6da4274724f6bd0f24f0fbfd1af076cd14b14710 (diff)
Another silly workaround for MSVC.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@145227 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CGCleanup.cpp')
-rw-r--r--lib/CodeGen/CGCleanup.cpp4
1 files changed, 3 insertions, 1 deletions
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);
}