From 7561d480953e0a2faa4af9be0a00b1180097c4bd 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". git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98463 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/CodeGen/MachineModuleInfo.cpp | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'lib/CodeGen/MachineModuleInfo.cpp') diff --git a/lib/CodeGen/MachineModuleInfo.cpp b/lib/CodeGen/MachineModuleInfo.cpp index 42c6a7fef3..e7373711cb 100644 --- a/lib/CodeGen/MachineModuleInfo.cpp +++ b/lib/CodeGen/MachineModuleInfo.cpp @@ -73,7 +73,7 @@ bool MachineModuleInfo::doFinalization() { /// getLabelSym - Turn a label ID into a symbol. MCSymbol *MachineModuleInfo::getLabelSym(unsigned ID) { return Context.GetOrCreateTemporarySymbol - (Twine(Context.getAsmInfo().getPrivateGlobalPrefix()) + "Label" +Twine(ID)); + (Twine(Context.getAsmInfo().getPrivateGlobalPrefix()) + "label" +Twine(ID)); } /// EndFunction - Discard function meta information. @@ -139,12 +139,11 @@ void MachineModuleInfo::addInvoke(MachineBasicBlock *LandingPad, /// addLandingPad - Provide the label of a try LandingPad block. /// -unsigned MachineModuleInfo::addLandingPad(MachineBasicBlock *LandingPad) { - unsigned LandingPadID = NextLabelID(); - MCSymbol *LandingPadLabel = getLabelSym(LandingPadID); +MCSymbol *MachineModuleInfo::addLandingPad(MachineBasicBlock *LandingPad) { + MCSymbol *LandingPadLabel = getLabelSym(NextLabelID()); LandingPadInfo &LP = getOrCreateLandingPadInfo(LandingPad); LP.LandingPadLabel = LandingPadLabel; - return LandingPadID; + return LandingPadLabel; } /// addPersonality - Provide the personality function for the exception -- cgit v1.2.3-18-g5258