summaryrefslogtreecommitdiff
path: root/lib/CodeGen/MachineFunction.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/CodeGen/MachineFunction.cpp')
-rw-r--r--lib/CodeGen/MachineFunction.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/CodeGen/MachineFunction.cpp b/lib/CodeGen/MachineFunction.cpp
index 80956bc4f7..4091e4274a 100644
--- a/lib/CodeGen/MachineFunction.cpp
+++ b/lib/CodeGen/MachineFunction.cpp
@@ -447,12 +447,12 @@ unsigned MachineFunction::addLiveIn(unsigned PReg,
/// normal 'L' label is returned.
MCSymbol *MachineFunction::getJTISymbol(unsigned JTI, MCContext &Ctx,
bool isLinkerPrivate) const {
+ const DataLayout *DL = getTarget().getDataLayout();
assert(JumpTableInfo && "No jump tables");
assert(JTI < JumpTableInfo->getJumpTables().size() && "Invalid JTI!");
- const MCAsmInfo &MAI = *getTarget().getMCAsmInfo();
- const char *Prefix = isLinkerPrivate ? MAI.getLinkerPrivateGlobalPrefix() :
- MAI.getPrivateGlobalPrefix();
+ const char *Prefix = isLinkerPrivate ? DL->getLinkerPrivateGlobalPrefix() :
+ DL->getPrivateGlobalPrefix();
SmallString<60> Name;
raw_svector_ostream(Name)
<< Prefix << "JTI" << getFunctionNumber() << '_' << JTI;
@@ -462,8 +462,8 @@ MCSymbol *MachineFunction::getJTISymbol(unsigned JTI, MCContext &Ctx,
/// getPICBaseSymbol - Return a function-local symbol to represent the PIC
/// base.
MCSymbol *MachineFunction::getPICBaseSymbol() const {
- const MCAsmInfo &MAI = *Target.getMCAsmInfo();
- return Ctx.GetOrCreateSymbol(Twine(MAI.getPrivateGlobalPrefix())+
+ const DataLayout *DL = getTarget().getDataLayout();
+ return Ctx.GetOrCreateSymbol(Twine(DL->getPrivateGlobalPrefix())+
Twine(getFunctionNumber())+"$pb");
}