aboutsummaryrefslogtreecommitdiffstats
path: root/lib/CodeGen/MachineModuleInfo.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2010-03-14 08:36:50 +0000
committerChris Lattner <sabre@nondot.org>2010-03-14 08:36:50 +0000
commit54e56f247fa9361208901ff6009499cdffe41b05 (patch)
treecfca325f2bbfbecb0f5bc5fc7f1996e58025416b /lib/CodeGen/MachineModuleInfo.cpp
parenta3fdc94928f39ffb8cdec47929bda5e2576c4136 (diff)
downloadexternal_llvm-54e56f247fa9361208901ff6009499cdffe41b05.zip
external_llvm-54e56f247fa9361208901ff6009499cdffe41b05.tar.gz
external_llvm-54e56f247fa9361208901ff6009499cdffe41b05.tar.bz2
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.cpp11
1 files changed, 2 insertions, 9 deletions
diff --git a/lib/CodeGen/MachineModuleInfo.cpp b/lib/CodeGen/MachineModuleInfo.cpp
index e737371..fdbda8f 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;