summaryrefslogtreecommitdiffstats
path: root/clang/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
commitba80390307e0438f6f793424727dfa518b6cf892 (patch)
tree4e9038d881649040b808859e0335d6f67361eabc /clang/lib/CodeGen/CodeGenFunction.h
parentcc54bd3cef954915885bc0fd6a12233585a41bc8 (diff)
downloadbcm5719-llvm-ba80390307e0438f6f793424727dfa518b6cf892.tar.gz
bcm5719-llvm-ba80390307e0438f6f793424727dfa518b6cf892.zip
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. llvm-svn: 109569
Diffstat (limited to 'clang/lib/CodeGen/CodeGenFunction.h')
-rw-r--r--clang/lib/CodeGen/CodeGenFunction.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/clang/lib/CodeGen/CodeGenFunction.h b/clang/lib/CodeGen/CodeGenFunction.h
index 1dfe8b68df7..78745709177 100644
--- a/clang/lib/CodeGen/CodeGenFunction.h
+++ b/clang/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
OpenPOWER on IntegriCloud