diff options
author | Dan Gohman <gohman@apple.com> | 2010-04-14 19:30:02 +0000 |
---|---|---|
committer | Dan Gohman <gohman@apple.com> | 2010-04-14 19:30:02 +0000 |
commit | c2c08d19b80f08c9fd6c1b17181665b983157885 (patch) | |
tree | 1d8c20a35e0c8979dc2130e70f4e46eb58601f78 /llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp | |
parent | a0e9a7285ed21796fc23c927c08ce88e18dc7fab (diff) | |
download | bcm5719-llvm-c2c08d19b80f08c9fd6c1b17181665b983157885.tar.gz bcm5719-llvm-c2c08d19b80f08c9fd6c1b17181665b983157885.zip |
Reset the debug location even if the instruction was a terminator.
llvm-svn: 101272
Diffstat (limited to 'llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp')
-rw-r--r-- | llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp b/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp index 5dd216bfaa8..71fbafe6f31 100644 --- a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp +++ b/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp @@ -260,13 +260,11 @@ void SelectionDAGISel::SelectBasicBlock(BasicBlock *LLVMBB, for (BasicBlock::iterator I = Begin; I != End && !SDB->HasTailCall; ++I) { SetDebugLoc(I, SDB, 0, MF); - if (!isa<TerminatorInst>(I)) { + // Visit the instruction. Terminators are handled below. + if (!isa<TerminatorInst>(I)) SDB->visit(*I); - // Set the current debug location back to "unknown" so that it doesn't - // spuriously apply to subsequent instructions. - ResetDebugLoc(SDB, 0); - } + ResetDebugLoc(SDB, 0); } if (!SDB->HasTailCall) { |