summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/CGCXXTemp.cpp
diff options
context:
space:
mode:
authorAnders Carlsson <andersca@mac.com>2009-06-04 02:22:12 +0000
committerAnders Carlsson <andersca@mac.com>2009-06-04 02:22:12 +0000
commit44bfcf0f97e52ac9545d35cafb8abca845565886 (patch)
tree2ae45fe2ae0737a7afa47695491ed875b527b663 /clang/lib/CodeGen/CGCXXTemp.cpp
parent8936009a919775af9f32c0172d9a871e9873344b (diff)
downloadbcm5719-llvm-44bfcf0f97e52ac9545d35cafb8abca845565886.tar.gz
bcm5719-llvm-44bfcf0f97e52ac9545d35cafb8abca845565886.zip
Add PushConditionalTempDestruction/PopConditionalTempDestruction.
llvm-svn: 72835
Diffstat (limited to 'clang/lib/CodeGen/CGCXXTemp.cpp')
-rw-r--r--clang/lib/CodeGen/CGCXXTemp.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/clang/lib/CodeGen/CGCXXTemp.cpp b/clang/lib/CodeGen/CGCXXTemp.cpp
index 4e20b74ed59..b7bc6b70334 100644
--- a/clang/lib/CodeGen/CGCXXTemp.cpp
+++ b/clang/lib/CodeGen/CGCXXTemp.cpp
@@ -67,3 +67,14 @@ CodeGenFunction::EmitCXXExprWithTemporaries(const CXXExprWithTemporaries *E,
return RV;
}
+
+void
+CodeGenFunction::PushConditionalTempDestruction() {
+ // Store the current number of live temporaries.
+ ConditionalTempDestructionStack.push_back(LiveTemporaries.size());
+}
+
+void CodeGenFunction::PopConditionalTempDestruction() {
+ ConditionalTempDestructionStack.pop_back();
+}
+
OpenPOWER on IntegriCloud