[llvm-commits] [llvm] r98471 - /llvm/trunk/lib/CodeGen/AsmPrinter/DwarfPrinter.cpp

Chris Lattner sabre at nondot.org
Sat Mar 13 23:02:50 PST 2010


Author: lattner
Date: Sun Mar 14 01:02:50 2010
New Revision: 98471

URL: http://llvm.org/viewvc/llvm-project?rev=98471&view=rev
Log:
Fix some EH failures on NNT I introduced in r98461

Modified:
    llvm/trunk/lib/CodeGen/AsmPrinter/DwarfPrinter.cpp

Modified: llvm/trunk/lib/CodeGen/AsmPrinter/DwarfPrinter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/AsmPrinter/DwarfPrinter.cpp?rev=98471&r1=98470&r2=98471&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/AsmPrinter/DwarfPrinter.cpp (original)
+++ llvm/trunk/lib/CodeGen/AsmPrinter/DwarfPrinter.cpp Sun Mar 14 01:02:50 2010
@@ -247,17 +247,19 @@
   
   for (unsigned i = 0, N = Moves.size(); i < N; ++i) {
     const MachineMove &Move = Moves[i];
+    MCSymbol *Label = 0;
     unsigned LabelID = Move.getLabelID();
     // Throw out move if the label is invalid.
-    if (LabelID == 0) continue;
-    MCSymbol *Label = getDWLabel("label", LabelID);
-    if (!Label->isDefined()) continue; // Not emitted, in dead code.
+    if (LabelID) {
+      Label = getDWLabel("label", LabelID);
+      if (!Label->isDefined()) continue; // Not emitted, in dead code.
+    }
 
     const MachineLocation &Dst = Move.getDestination();
     const MachineLocation &Src = Move.getSource();
 
     // Advance row if new location.
-    if (BaseLabel) {
+    if (BaseLabel && Label) {
       MCSymbol *ThisSym = Label;
       if (ThisSym != BaseLabel) {
         EmitCFAByte(dwarf::DW_CFA_advance_loc4);





More information about the llvm-commits mailing list