diff options
author | Eric Christopher <echristo@apple.com> | 2012-02-23 00:43:07 +0000 |
---|---|---|
committer | Eric Christopher <echristo@apple.com> | 2012-02-23 00:43:07 +0000 |
commit | fdc5d565b30bd2009ec98aac4b5846a740aff767 (patch) | |
tree | 557d6508b19397727361602733db45ba6e3df6dc /lib/CodeGen/CGStmt.cpp | |
parent | 709296dfad3742b0f6b748cea5b93c99f596e00f (diff) |
Fold debug scope emission into the cleanup scope.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151216 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CGStmt.cpp')
-rw-r--r-- | lib/CodeGen/CGStmt.cpp | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/lib/CodeGen/CGStmt.cpp b/lib/CodeGen/CGStmt.cpp index 47807c407b..d87202ee59 100644 --- a/lib/CodeGen/CGStmt.cpp +++ b/lib/CodeGen/CGStmt.cpp @@ -191,20 +191,13 @@ RValue CodeGenFunction::EmitCompoundStmt(const CompoundStmt &S, bool GetLast, PrettyStackTraceLoc CrashInfo(getContext().getSourceManager(),S.getLBracLoc(), "LLVM IR generation of compound statement ('{}')"); - CGDebugInfo *DI = getDebugInfo(); - if (DI) - DI->EmitLexicalBlockStart(Builder, S.getLBracLoc()); - - // Keep track of the current cleanup stack depth. - RunCleanupsScope Scope(*this); + // Keep track of the current cleanup stack depth, including debug scopes. + LexicalScope Scope(*this, S.getSourceRange()); for (CompoundStmt::const_body_iterator I = S.body_begin(), E = S.body_end()-GetLast; I != E; ++I) EmitStmt(*I); - if (DI) - DI->EmitLexicalBlockEnd(Builder, S.getRBracLoc()); - RValue RV; if (!GetLast) RV = RValue::get(0); |