diff options
author | Chris Lattner <sabre@nondot.org> | 2010-03-14 02:33:54 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2010-03-14 02:33:54 +0000 |
commit | ee2fbbc978aa29a0196ea522adb947a8f86dde4a (patch) | |
tree | b2ceb0047581b28bbf89d16f9329e0401478244e /llvm/lib/CodeGen/MachineModuleInfo.cpp | |
parent | 07293da97ebf4028f95ba0b9c0a6f200b4c03ebc (diff) | |
download | bcm5719-llvm-ee2fbbc978aa29a0196ea522adb947a8f86dde4a.tar.gz bcm5719-llvm-ee2fbbc978aa29a0196ea522adb947a8f86dde4a.zip |
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
Diffstat (limited to 'llvm/lib/CodeGen/MachineModuleInfo.cpp')
-rw-r--r-- | llvm/lib/CodeGen/MachineModuleInfo.cpp | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/llvm/lib/CodeGen/MachineModuleInfo.cpp b/llvm/lib/CodeGen/MachineModuleInfo.cpp index 42c6a7fef3f..e7373711cb7 100644 --- a/llvm/lib/CodeGen/MachineModuleInfo.cpp +++ b/llvm/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 |