]> granicus.if.org Git - clang/commitdiff
When we're at the stack depth we want, there isn't anything to do.
authorMike Stump <mrs@apple.com>
Sun, 8 Feb 2009 22:00:53 +0000 (22:00 +0000)
committerMike Stump <mrs@apple.com>
Sun, 8 Feb 2009 22:00:53 +0000 (22:00 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64095 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/CGStmt.cpp

index 5072d63593f3109181251ca08df4c6ca2ef00130..4c634efb1064f9b251e7c02862335ab3ea8cb427 100644 (file)
@@ -199,6 +199,10 @@ void CodeGenFunction::EmitBlock(llvm::BasicBlock *BB, bool IsFinished) {
 }
 
 bool CodeGenFunction::EmitStackUpdate(llvm::Value *V) {
+  // If we're already at the depth we want...
+  if (StackDepth == V)
+    return false;
+
   // V can be 0 here, if it is, be sure to start searching from the
   // top of the function, as we want the next save after that point.
   for (unsigned int i = 0; i < StackSaveValues.size(); ++i)