summaryrefslogtreecommitdiffstats
path: root/lib/CodeGen/CGCXXTemp.cpp
diff options
context:
space:
mode:
authored <ed@FreeBSD.org>2009-06-22 08:08:35 +0000
committered <ed@FreeBSD.org>2009-06-22 08:08:35 +0000
commit8927c19a5ed03bef55dac4b623688387bcc794dc (patch)
treeb6403365e77095a79062d3379c9e6aea0df5f088 /lib/CodeGen/CGCXXTemp.cpp
parentb8e7410b22fa573fb0078712439f343bc69208dd (diff)
downloadFreeBSD-src-8927c19a5ed03bef55dac4b623688387bcc794dc.zip
FreeBSD-src-8927c19a5ed03bef55dac4b623688387bcc794dc.tar.gz
Update Clang sources to r73879.
Diffstat (limited to 'lib/CodeGen/CGCXXTemp.cpp')
-rw-r--r--lib/CodeGen/CGCXXTemp.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/CodeGen/CGCXXTemp.cpp b/lib/CodeGen/CGCXXTemp.cpp
index 141726a..a6e6d11 100644
--- a/lib/CodeGen/CGCXXTemp.cpp
+++ b/lib/CodeGen/CGCXXTemp.cpp
@@ -85,6 +85,11 @@ RValue
CodeGenFunction::EmitCXXExprWithTemporaries(const CXXExprWithTemporaries *E,
llvm::Value *AggLoc,
bool isAggLocVolatile) {
+ // If we shouldn't destroy the temporaries, just emit the
+ // child expression.
+ if (!E->shouldDestroyTemporaries())
+ return EmitAnyExpr(E->getSubExpr(), AggLoc, isAggLocVolatile);
+
// Keep track of the current cleanup stack depth.
size_t CleanupStackDepth = CleanupEntries.size();
(void) CleanupStackDepth;
OpenPOWER on IntegriCloud