From: Mike Stump Date: Sun, 8 Feb 2009 22:00:53 +0000 (+0000) Subject: When we're at the stack depth we want, there isn't anything to do. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=225b16dbaaca36aae6934fafd0ab718393f97019;p=clang When we're at the stack depth we want, there isn't anything to do. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64095 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/CodeGen/CGStmt.cpp b/lib/CodeGen/CGStmt.cpp index 5072d63593..4c634efb10 100644 --- a/lib/CodeGen/CGStmt.cpp +++ b/lib/CodeGen/CGStmt.cpp @@ -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)