aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/CGStmt.cpp
diff options
context:
space:
mode:
authorDevang Patel <dpatel@apple.com>2011-03-29 18:35:54 +0000
committerDevang Patel <dpatel@apple.com>2011-03-29 18:35:54 +0000
commitb603c90b75df2141c5722816a13920221eb4faee (patch)
tree9da9d424ff29779956a92c298d20c8e65a62f74e /lib/CodeGen/CGStmt.cpp
parent903dec2a0d96e4fc370050c204fe6aa27f29f6ab (diff)
Do not line number entry for unconditional branches. Usually, users do not want to stop at closing '}'.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128471 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CGStmt.cpp')
-rw-r--r--lib/CodeGen/CGStmt.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/CodeGen/CGStmt.cpp b/lib/CodeGen/CGStmt.cpp
index 24acf65739..add85a2a06 100644
--- a/lib/CodeGen/CGStmt.cpp
+++ b/lib/CodeGen/CGStmt.cpp
@@ -270,6 +270,9 @@ void CodeGenFunction::EmitBranch(llvm::BasicBlock *Target) {
// terminated, don't touch it.
} else {
// Otherwise, create a fall-through branch.
+ // There is no need to emit line number for unconditional branch.
+ if (getDebugInfo())
+ Builder.SetCurrentDebugLocation(llvm::DebugLoc());
Builder.CreateBr(Target);
}