diff options
author | Dan Gohman <gohman@apple.com> | 2010-04-16 05:06:56 +0000 |
---|---|---|
committer | Dan Gohman <gohman@apple.com> | 2010-04-16 05:06:56 +0000 |
commit | f89d1dc9b77ee006324653f70496d29ac3d3bc6c (patch) | |
tree | b5224c6695699df704c29d7dfd451225a43476e1 /lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp | |
parent | 4b67bc1e80a94ccceebda899e889e15c6c6c45ba (diff) |
Refine further the scope where the global DebugLoc value is active.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101443 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp')
-rw-r--r-- | lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp b/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp index 7a4a4f9a1a..c38c8e9cdd 100644 --- a/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp +++ b/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp @@ -256,15 +256,13 @@ void SelectionDAGISel::SelectBasicBlock(const BasicBlock *LLVMBB, SDB->setCurrentBasicBlock(BB); // Lower all of the non-terminator instructions. If a call is emitted - // as a tail call, cease emitting nodes for this block. + // as a tail call, cease emitting nodes for this block. Terminators + // are handled below. for (BasicBlock::const_iterator I = Begin; - I != End && !SDB->HasTailCall; ++I) { + I != End && !SDB->HasTailCall && !isa<TerminatorInst>(I); + ++I) { SetDebugLoc(I, SDB, 0, MF); - - // Visit the instruction. Terminators are handled below. - if (!isa<TerminatorInst>(I)) - SDB->visit(*I); - + SDB->visit(*I); ResetDebugLoc(SDB, 0); } |