diff options
author | Adrian Prantl <aprantl@apple.com> | 2013-04-01 19:02:06 +0000 |
---|---|---|
committer | Adrian Prantl <aprantl@apple.com> | 2013-04-01 19:02:06 +0000 |
commit | efb72adbae0c253fc2fd9127fb3e1c36cb1b8d93 (patch) | |
tree | 8c6980429cc8bd5261913db7543167645d657b1a /lib/CodeGen/CodeGenFunction.h | |
parent | 5b8740f840238b3616691e5b300df57a758f32a6 (diff) |
* Attempt to un-break gdb buildbot by emitting a lexical block end only
when we actually end a lexical block.
* Added new test for line table / block cleanup.
* Follow-up to r177819 / rdar://problem/13115369
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@178490 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CodeGenFunction.h')
-rw-r--r-- | lib/CodeGen/CodeGenFunction.h | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/lib/CodeGen/CodeGenFunction.h b/lib/CodeGen/CodeGenFunction.h index e40a731825..f76022fb97 100644 --- a/lib/CodeGen/CodeGenFunction.h +++ b/lib/CodeGen/CodeGenFunction.h @@ -881,6 +881,9 @@ public: /// \brief Exit this cleanup scope, emitting any accumulated /// cleanups. ~LexicalScope() { + if (CGDebugInfo *DI = CGF.getDebugInfo()) + DI->EmitLexicalBlockEnd(CGF.Builder, Range.getEnd()); + // If we should perform a cleanup, force them now. Note that // this ends the cleanup scope before rescoping any labels. if (PerformCleanup) ForceCleanup(); @@ -889,15 +892,9 @@ public: /// \brief Force the emission of cleanups now, instead of waiting /// until this object is destroyed. void ForceCleanup() { + CGF.CurLexicalScope = ParentScope; RunCleanupsScope::ForceCleanup(); - endLexicalScope(); - } - private: - void endLexicalScope() { - CGF.CurLexicalScope = ParentScope; - if (CGDebugInfo *DI = CGF.getDebugInfo()) - DI->EmitLexicalBlockEnd(CGF.Builder, Range.getEnd()); if (!Labels.empty()) rescopeLabels(); } |