change the LabelSDNode to be EHLabelSDNode and make it hold
an MCSymbol.  Make the EH_LABEL MachineInstr hold its label
with an MCSymbol instead of ID.  Fix a bug in MMI.cpp which
would return labels named "Label4" instead of "label4".


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98463 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/CodeGen/AsmPrinter/DwarfException.cpp b/lib/CodeGen/AsmPrinter/DwarfException.cpp
index ff0aa80..b5f7270 100644
--- a/lib/CodeGen/AsmPrinter/DwarfException.cpp
+++ b/lib/CodeGen/AsmPrinter/DwarfException.cpp
@@ -475,9 +475,15 @@
         continue;
       }
 
-      unsigned BeginLabelNo = MI->getOperand(0).getImm();
-      assert(BeginLabelNo && "Invalid label!");
-      MCSymbol *BeginLabel = getDWLabel("label", BeginLabelNo);
+      MCSymbol *BeginLabel;
+      if (MI->getOperand(0).isImm()) {
+        unsigned BeginLabelNo = MI->getOperand(0).getImm();
+        assert(BeginLabelNo && "Invalid label!");
+        BeginLabel = getDWLabel("label", BeginLabelNo);
+      } else {
+        BeginLabel = MI->getOperand(0).getMCSymbol();
+      }
+      
 
       // End of the previous try-range?
       if (BeginLabel == LastLabel)