From fdc5d565b30bd2009ec98aac4b5846a740aff767 Mon Sep 17 00:00:00 2001 From: Eric Christopher Date: Thu, 23 Feb 2012 00:43:07 +0000 Subject: [PATCH] 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 --- lib/CodeGen/CGStmt.cpp | 11 ++--------- 1 file 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); -- 2.50.1