diff options
author | Adrian Prantl <aprantl@apple.com> | 2014-05-28 19:10:59 +0000 |
---|---|---|
committer | Adrian Prantl <aprantl@apple.com> | 2014-05-28 19:10:59 +0000 |
commit | 328f88add9bdbcb8d5f08385a9d378dcef87933b (patch) | |
tree | da65e9beda229283d0a37a840bf6cf175e45a89f /clang/lib/CodeGen/CGStmt.cpp | |
parent | 26b6edcf441207ec9680c1a41e3666f86ae58903 (diff) | |
download | bcm5719-llvm-328f88add9bdbcb8d5f08385a9d378dcef87933b.tar.gz bcm5719-llvm-328f88add9bdbcb8d5f08385a9d378dcef87933b.zip |
Debug Info: Fix the source range for IfStmt's ConditionScope.
Since the continuation block of the if statement is emitted within the
condition scope this had the undesirable effect of creating a line table
entry at the end of the then or else statement, a line that may have never
been executed.
PR19864 / rdar://problem/17052973
llvm-svn: 209764
Diffstat (limited to 'clang/lib/CodeGen/CGStmt.cpp')
-rw-r--r-- | clang/lib/CodeGen/CGStmt.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/lib/CodeGen/CGStmt.cpp b/clang/lib/CodeGen/CGStmt.cpp index 573973a9821..534c16deeea 100644 --- a/clang/lib/CodeGen/CGStmt.cpp +++ b/clang/lib/CodeGen/CGStmt.cpp @@ -436,7 +436,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. - LexicalScope ConditionScope(*this, S.getSourceRange()); + LexicalScope ConditionScope(*this, S.getCond()->getSourceRange()); RegionCounter Cnt = getPGORegionCounter(&S); if (S.getConditionVariable()) |