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 | 6e52e9db31747089989267b7926a31407111e4af (patch) | |
tree | 13e4e19c241b6ac81e5ad9c19a0700106d285f6b /llvm/lib/CodeGen/MachineModuleInfo.cpp | |
parent | b4c0f5cc7921a4d08ff78ef6a2ef61eb508ea6d0 (diff) | |
download | llvm-6e52e9db31747089989267b7926a31407111e4af.zip llvm-6e52e9db31747089989267b7926a31407111e4af.tar.gz llvm-6e52e9db31747089989267b7926a31407111e4af.tar.bz2 |
get MMI out of the label uniquing business, just go to MCContext
to get unique assembler temporary labels.
llvm-svn: 98489
Diffstat (limited to 'llvm/lib/CodeGen/MachineModuleInfo.cpp')
-rw-r--r-- | llvm/lib/CodeGen/MachineModuleInfo.cpp | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/llvm/lib/CodeGen/MachineModuleInfo.cpp b/llvm/lib/CodeGen/MachineModuleInfo.cpp index e737371..fdbda8f 100644 --- a/llvm/lib/CodeGen/MachineModuleInfo.cpp +++ b/llvm/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; |