aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/CodeGenFunction.h
diff options
context:
space:
mode:
authorJohn McCall <rjmccall@apple.com>2010-07-28 01:07:35 +0000
committerJohn McCall <rjmccall@apple.com>2010-07-28 01:07:35 +0000
commit413e67778d593215d2f2161a4e712c8568f1ddd0 (patch)
treeb60f39de30d8e7421a919d01fd87d1f7173947c4 /lib/CodeGen/CodeGenFunction.h
parent7bce3a122296eba0e74f401c188e55c71935132f (diff)
When creating a jump destination, its scope should be the scope of the
enclosing normal cleanup, not the top of the EH stack. I'm *really* surprised this hasn't been causing more problems. Fixes rdar://problem/8231514. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109569 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CodeGenFunction.h')
-rw-r--r--lib/CodeGen/CodeGenFunction.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/CodeGen/CodeGenFunction.h b/lib/CodeGen/CodeGenFunction.h
index 1dfe8b68df..7874570917 100644
--- a/lib/CodeGen/CodeGenFunction.h
+++ b/lib/CodeGen/CodeGenFunction.h
@@ -575,7 +575,9 @@ public:
/// target of a potentially scope-crossing jump; get a stable handle
/// to which we can perform this jump later.
JumpDest getJumpDestInCurrentScope(llvm::BasicBlock *Target) {
- return JumpDest(Target, EHStack.stable_begin(), NextCleanupDestIndex++);
+ return JumpDest(Target,
+ EHStack.getInnermostNormalCleanup(),
+ NextCleanupDestIndex++);
}
/// The given basic block lies in the current EH scope, but may be a