diff options
| author | Eric Christopher <echristo@gmail.com> | 2013-07-10 20:14:36 +0000 |
|---|---|---|
| committer | Eric Christopher <echristo@gmail.com> | 2013-07-10 20:14:36 +0000 |
| commit | 872018b5be9b98d846d87c8946e85d9bc1a76a36 (patch) | |
| tree | f68df5d77448907a6d1a7f05d9547d8930e11f8c /clang/lib | |
| parent | fbcafc0793e13a51aea3865cc8bda6751056943c (diff) | |
| download | bcm5719-llvm-872018b5be9b98d846d87c8946e85d9bc1a76a36.tar.gz bcm5719-llvm-872018b5be9b98d846d87c8946e85d9bc1a76a36.zip | |
Use a LexicalScope here since it is one and it will encapsulate
the two sets of debug scope and cleanup scope.
llvm-svn: 186030
Diffstat (limited to 'clang/lib')
| -rw-r--r-- | clang/lib/CodeGen/CGStmt.cpp | 14 |
1 files changed, 2 insertions, 12 deletions
diff --git a/clang/lib/CodeGen/CGStmt.cpp b/clang/lib/CodeGen/CGStmt.cpp index 54abbab2afd..8ee919754b0 100644 --- a/clang/lib/CodeGen/CGStmt.cpp +++ b/clang/lib/CodeGen/CGStmt.cpp @@ -425,12 +425,7 @@ void CodeGenFunction::EmitIndirectGotoStmt(const IndirectGotoStmt &S) { void CodeGenFunction::EmitIfStmt(const IfStmt &S) { // C99 6.8.4.1: The first substatement is executed if the expression compares // unequal to 0. The condition must be a scalar type. - RunCleanupsScope ConditionScope(*this); - - // Also open a debugger-visible lexical scope for the condition. - CGDebugInfo *DI = getDebugInfo(); - if (DI) - DI->EmitLexicalBlockStart(Builder, S.getSourceRange().getBegin()); + LexicalScope ConditionScope(*this, S.getSourceRange()); if (S.getConditionVariable()) EmitAutoVarDecl(*S.getConditionVariable()); @@ -452,8 +447,6 @@ void CodeGenFunction::EmitIfStmt(const IfStmt &S) { RunCleanupsScope ExecutedScope(*this); EmitStmt(Executed); } - if (DI) - DI->EmitLexicalBlockEnd(Builder, S.getSourceRange().getEnd()); return; } } @@ -491,9 +484,6 @@ void CodeGenFunction::EmitIfStmt(const IfStmt &S) { EmitBranch(ContBlock); } - if (DI) - DI->EmitLexicalBlockEnd(Builder, S.getSourceRange().getEnd()); - // Emit the continuation block for code after the if. EmitBlock(ContBlock, true); } @@ -1353,7 +1343,7 @@ SimplifyConstraint(const char *Constraint, const TargetInfo &Target, break; case '#': // Ignore the rest of the constraint alternative. while (Constraint[1] && Constraint[1] != ',') - Constraint++; + Constraint++; break; case ',': Result += "|"; |

