summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen
diff options
context:
space:
mode:
authorAdrian Prantl <aprantl@apple.com>2013-04-01 19:02:06 +0000
committerAdrian Prantl <aprantl@apple.com>2013-04-01 19:02:06 +0000
commit5d5b67c52cd2e1fc1ef2342a4480938a70f0d2ec (patch)
treebade924acf2ba76c610c79616eb2ed4828f836f0 /clang/lib/CodeGen
parent3f88d08974a9ad606a8e0df0ab87b6302101dee1 (diff)
downloadbcm5719-llvm-5d5b67c52cd2e1fc1ef2342a4480938a70f0d2ec.tar.gz
bcm5719-llvm-5d5b67c52cd2e1fc1ef2342a4480938a70f0d2ec.zip
* 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 llvm-svn: 178490
Diffstat (limited to 'clang/lib/CodeGen')
-rw-r--r--clang/lib/CodeGen/CodeGenFunction.h11
1 files changed, 4 insertions, 7 deletions
diff --git a/clang/lib/CodeGen/CodeGenFunction.h b/clang/lib/CodeGen/CodeGenFunction.h
index e40a731825b..f76022fb97d 100644
--- a/clang/lib/CodeGen/CodeGenFunction.h
+++ b/clang/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();
}
OpenPOWER on IntegriCloud