aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/CodeGenFunction.h
diff options
context:
space:
mode:
authorMike Stump <mrs@apple.com>2009-02-07 23:02:10 +0000
committerMike Stump <mrs@apple.com>2009-02-07 23:02:10 +0000
commit3e9da66ac7e88d64d30ee777588677320660cf84 (patch)
tree3a6306abbd236f9ad372ed47347dba9ea19e358f /lib/CodeGen/CodeGenFunction.h
parent043254a9d267d48f1289c3274fad0a17f97c435d (diff)
Ensure we track all the stack depths for all break and continue points
correctly. This should lay the ground work to throw the big switch and start code gening break and continue in the presense of vlas. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64046 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CodeGenFunction.h')
-rw-r--r--lib/CodeGen/CodeGenFunction.h15
1 files changed, 11 insertions, 4 deletions
diff --git a/lib/CodeGen/CodeGenFunction.h b/lib/CodeGen/CodeGenFunction.h
index 4ff3badd99..068627139d 100644
--- a/lib/CodeGen/CodeGenFunction.h
+++ b/lib/CodeGen/CodeGenFunction.h
@@ -156,6 +156,12 @@ private:
/// condition has possibly started a vla.
void BreakContinuePush(llvm::BasicBlock *bb, llvm::BasicBlock *cb) {
BreakContinueStack.push_back(BreakContinue(bb, cb, StackDepth,
+ StackDepth,
+ ObjCEHStack.size()));
+ }
+ void BreakContinuePush(llvm::BasicBlock *bb, llvm::BasicBlock *cb,
+ llvm::Value *bsd, llvm::Value *csd) {
+ BreakContinueStack.push_back(BreakContinue(bb, cb, bsd, csd,
ObjCEHStack.size()));
}
@@ -169,13 +175,14 @@ private:
// of the eh stack.
struct BreakContinue {
BreakContinue(llvm::BasicBlock *bb, llvm::BasicBlock *cb,
- llvm::Value *sd, size_t ehss)
- : BreakBlock(bb), ContinueBlock(cb), SaveStackDepth(sd),
- EHStackSize(ehss) {}
+ llvm::Value *bsd, llvm::Value *csd, size_t ehss)
+ : BreakBlock(bb), ContinueBlock(cb), SaveBreakStackDepth(bsd),
+ SaveContinueStackDepth(csd), EHStackSize(ehss) {}
llvm::BasicBlock *BreakBlock;
llvm::BasicBlock *ContinueBlock;
- llvm::Value *SaveStackDepth;
+ llvm::Value *SaveBreakStackDepth;
+ llvm::Value *SaveContinueStackDepth;
size_t EHStackSize;
};
llvm::SmallVector<BreakContinue, 8> BreakContinueStack;