diff options
author | Chris Lattner <sabre@nondot.org> | 2010-03-14 08:36:50 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2010-03-14 08:36:50 +0000 |
commit | 63d7836267298f5b6cde43f0a89acbabfc109f48 (patch) | |
tree | cfca325f2bbfbecb0f5bc5fc7f1996e58025416b /lib/CodeGen/MachineModuleInfo.cpp | |
parent | 6b4205aa44094f96115be72dd23aaf47a0257d2f (diff) |
get MMI out of the label uniquing business, just go to MCContext
to get unique assembler temporary labels.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98489 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/MachineModuleInfo.cpp')
-rw-r--r-- | lib/CodeGen/MachineModuleInfo.cpp | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/lib/CodeGen/MachineModuleInfo.cpp b/lib/CodeGen/MachineModuleInfo.cpp index e7373711cb..fdbda8f715 100644 --- a/lib/CodeGen/MachineModuleInfo.cpp +++ b/lib/CodeGen/MachineModuleInfo.cpp @@ -22,7 +22,6 @@ #include "llvm/Target/TargetInstrInfo.h" #include "llvm/Target/TargetMachine.h" #include "llvm/Target/TargetOptions.h" -#include "llvm/MC/MCAsmInfo.h" #include "llvm/MC/MCSymbol.h" #include "llvm/Support/Dwarf.h" #include "llvm/Support/ErrorHandling.h" @@ -41,7 +40,7 @@ MachineModuleInfoImpl::~MachineModuleInfoImpl() {} MachineModuleInfo::MachineModuleInfo(const MCAsmInfo &MAI) : ImmutablePass(&ID), Context(MAI), - ObjFileMMI(0), NextLabelIDToReturn(1), + ObjFileMMI(0), CurCallSite(0), CallsEHReturn(0), CallsUnwindInit(0), DbgInfoAvailable(false){ // Always emit some info, by default "no personality" info. Personalities.push_back(NULL); @@ -70,12 +69,6 @@ bool MachineModuleInfo::doFinalization() { return false; } -/// getLabelSym - Turn a label ID into a symbol. -MCSymbol *MachineModuleInfo::getLabelSym(unsigned ID) { - return Context.GetOrCreateTemporarySymbol - (Twine(Context.getAsmInfo().getPrivateGlobalPrefix()) + "label" +Twine(ID)); -} - /// EndFunction - Discard function meta information. /// void MachineModuleInfo::EndFunction() { @@ -140,7 +133,7 @@ void MachineModuleInfo::addInvoke(MachineBasicBlock *LandingPad, /// addLandingPad - Provide the label of a try LandingPad block. /// MCSymbol *MachineModuleInfo::addLandingPad(MachineBasicBlock *LandingPad) { - MCSymbol *LandingPadLabel = getLabelSym(NextLabelID()); + MCSymbol *LandingPadLabel = Context.CreateTempSymbol(); LandingPadInfo &LP = getOrCreateLandingPadInfo(LandingPad); LP.LandingPadLabel = LandingPadLabel; return LandingPadLabel; |