[llvm-commits] [llvm] r101272 - /llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp

Dan Gohman gohman at apple.com
Wed Apr 14 12:30:02 PDT 2010


Author: djg
Date: Wed Apr 14 14:30:02 2010
New Revision: 101272

URL: http://llvm.org/viewvc/llvm-project?rev=101272&view=rev
Log:
Reset the debug location even if the instruction was a terminator.

Modified:
    llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp

Modified: llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp?rev=101272&r1=101271&r2=101272&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp (original)
+++ llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp Wed Apr 14 14:30:02 2010
@@ -260,13 +260,11 @@
   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) {





More information about the llvm-commits mailing list