diff options
| author | John McCall <rjmccall@apple.com> | 2010-07-28 01:07:35 +0000 | 
|---|---|---|
| committer | John McCall <rjmccall@apple.com> | 2010-07-28 01:07:35 +0000 | 
| commit | ba80390307e0438f6f793424727dfa518b6cf892 (patch) | |
| tree | 4e9038d881649040b808859e0335d6f67361eabc /clang/lib/CodeGen/CodeGenFunction.cpp | |
| parent | cc54bd3cef954915885bc0fd6a12233585a41bc8 (diff) | |
| download | llvm-ba80390307e0438f6f793424727dfa518b6cf892.zip llvm-ba80390307e0438f6f793424727dfa518b6cf892.tar.gz llvm-ba80390307e0438f6f793424727dfa518b6cf892.tar.bz2  | |
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.cpp')
| -rw-r--r-- | clang/lib/CodeGen/CodeGenFunction.cpp | 3 | 
1 files changed, 3 insertions, 0 deletions
diff --git a/clang/lib/CodeGen/CodeGenFunction.cpp b/clang/lib/CodeGen/CodeGenFunction.cpp index d6e498f..396ab4e 100644 --- a/clang/lib/CodeGen/CodeGenFunction.cpp +++ b/clang/lib/CodeGen/CodeGenFunction.cpp @@ -1055,6 +1055,9 @@ void CodeGenFunction::PopCleanupBlock(bool FallthroughIsBranchThrough) {  ///  /// As a side-effect, this method clears the insertion point.  void CodeGenFunction::EmitBranchThroughCleanup(JumpDest Dest) { +  assert(Dest.getScopeDepth().encloses(EHStack.getInnermostNormalCleanup()) +         && "stale jump destination"); +    if (!HaveInsertPoint())      return;  | 
