]> granicus.if.org Git - clang/commitdiff
Save and restore the DidCallStackSave variable
authorAnders Carlsson <andersca@mac.com>
Mon, 9 Feb 2009 20:23:40 +0000 (20:23 +0000)
committerAnders Carlsson <andersca@mac.com>
Mon, 9 Feb 2009 20:23:40 +0000 (20:23 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64157 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/CGStmt.cpp

index 4c634efb1064f9b251e7c02862335ab3ea8cb427..17b6fa4b48dab7e730ae2cd3860a0b82c284f9a2 100644 (file)
@@ -134,6 +134,8 @@ RValue CodeGenFunction::EmitCompoundStmt(const CompoundStmt &S, bool GetLast,
   // Keep track of the current cleanup stack depth.
   size_t CleanupStackDepth = CleanupEntries.size();
   
+  bool OldDidCallStackSave = DidCallStackSave;
+  
   // Push a null stack save value.
   StackSaveValues.push_back(0);
   
@@ -174,6 +176,8 @@ RValue CodeGenFunction::EmitCompoundStmt(const CompoundStmt &S, bool GetLast,
     Builder.CreateCall(F, V);
   }
   
+  DidCallStackSave = OldDidCallStackSave;
+  
   EmitCleanupBlocks(CleanupStackDepth);
   
   return RV;