summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/CGStmt.cpp
diff options
context:
space:
mode:
authorEric Christopher <echristo@apple.com>2012-02-23 00:43:07 +0000
committerEric Christopher <echristo@apple.com>2012-02-23 00:43:07 +0000
commit27bc9fee2b56b22f0dc66479e1d6b4eb3c72aed6 (patch)
tree3f1f7bd9a0085b3e637739d1eb23ba3406413aae /clang/lib/CodeGen/CGStmt.cpp
parent7277284f87dd195294355416d29ff3e6715d037a (diff)
downloadbcm5719-llvm-27bc9fee2b56b22f0dc66479e1d6b4eb3c72aed6.tar.gz
bcm5719-llvm-27bc9fee2b56b22f0dc66479e1d6b4eb3c72aed6.zip
Fold debug scope emission into the cleanup scope.
llvm-svn: 151216
Diffstat (limited to 'clang/lib/CodeGen/CGStmt.cpp')
-rw-r--r--clang/lib/CodeGen/CGStmt.cpp11
1 files changed, 2 insertions, 9 deletions
diff --git a/clang/lib/CodeGen/CGStmt.cpp b/clang/lib/CodeGen/CGStmt.cpp
index 47807c407b3..d87202ee59f 100644
--- a/clang/lib/CodeGen/CGStmt.cpp
+++ b/clang/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);
OpenPOWER on IntegriCloud