From ee2fbbc978aa29a0196ea522adb947a8f86dde4a Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Sun, 14 Mar 2010 02:33:54 +0000 Subject: 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". llvm-svn: 98463 --- llvm/lib/CodeGen/AsmPrinter/DwarfException.cpp | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'llvm/lib/CodeGen/AsmPrinter/DwarfException.cpp') diff --git a/llvm/lib/CodeGen/AsmPrinter/DwarfException.cpp b/llvm/lib/CodeGen/AsmPrinter/DwarfException.cpp index ff0aa80b1d7..b5f7270ba5e 100644 --- a/llvm/lib/CodeGen/AsmPrinter/DwarfException.cpp +++ b/llvm/lib/CodeGen/AsmPrinter/DwarfException.cpp @@ -475,9 +475,15 @@ ComputeCallSiteTable(SmallVectorImpl &CallSites, 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) -- cgit v1.2.3