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 | 55634730622575e7563a5813762bae27777b4dc6 (patch) | |
tree | 268c2a47385f1febf83c96d72aa1c05fa8bcce7c /llvm/lib/CodeGen | |
parent | 2a5aafff307af23bed06a71a550865f00b152a53 (diff) | |
download | bcm5719-llvm-55634730622575e7563a5813762bae27777b4dc6.tar.gz bcm5719-llvm-55634730622575e7563a5813762bae27777b4dc6.zip |
Refine further the scope where the global DebugLoc value is active.
llvm-svn: 101443
Diffstat (limited to 'llvm/lib/CodeGen')
-rw-r--r-- | llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp b/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp index 7a4a4f9a1ad..c38c8e9cddb 100644 --- a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp +++ b/llvm/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); } |