summaryrefslogtreecommitdiffstats
path: root/clang/lib
diff options
context:
space:
mode:
Diffstat (limited to 'clang/lib')
-rw-r--r--clang/lib/CodeGen/CGCleanup.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/clang/lib/CodeGen/CGCleanup.cpp b/clang/lib/CodeGen/CGCleanup.cpp
index c3eb2c67bc8..308409dbb63 100644
--- a/clang/lib/CodeGen/CGCleanup.cpp
+++ b/clang/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);
}
OpenPOWER on IntegriCloud