summaryrefslogtreecommitdiff
path: root/lib/Target
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Target')
-rw-r--r--lib/Target/ARM/ARMAsmPrinter.cpp2
-rw-r--r--lib/Target/ARM/ARMTargetObjectFile.cpp4
-rw-r--r--lib/Target/ARM/ARMTargetObjectFile.h2
-rw-r--r--lib/Target/Hexagon/HexagonTargetObjectFile.cpp7
-rw-r--r--lib/Target/Hexagon/HexagonTargetObjectFile.h2
-rw-r--r--lib/Target/Mips/MipsTargetObjectFile.cpp2
-rw-r--r--lib/Target/Mips/MipsTargetObjectFile.h2
-rw-r--r--lib/Target/NVPTX/NVPTXTargetObjectFile.h2
-rw-r--r--lib/Target/PowerPC/PPCTargetObjectFile.cpp6
-rw-r--r--lib/Target/PowerPC/PPCTargetObjectFile.h2
-rw-r--r--lib/Target/Sparc/SparcTargetObjectFile.cpp6
-rw-r--r--lib/Target/Sparc/SparcTargetObjectFile.h2
-rw-r--r--lib/Target/TargetLoweringObjectFile.cpp12
-rw-r--r--lib/Target/X86/X86TargetObjectFile.cpp12
-rw-r--r--lib/Target/X86/X86TargetObjectFile.h6
-rw-r--r--lib/Target/XCore/XCoreAsmPrinter.cpp4
-rw-r--r--lib/Target/XCore/XCoreTargetObjectFile.cpp4
-rw-r--r--lib/Target/XCore/XCoreTargetObjectFile.h4
18 files changed, 41 insertions, 40 deletions
diff --git a/lib/Target/ARM/ARMAsmPrinter.cpp b/lib/Target/ARM/ARMAsmPrinter.cpp
index 68820f4332..5a81a73ff6 100644
--- a/lib/Target/ARM/ARMAsmPrinter.cpp
+++ b/lib/Target/ARM/ARMAsmPrinter.cpp
@@ -474,7 +474,7 @@ void ARMAsmPrinter::EmitStartOfAsmFile(Module &M) {
// Now any user defined text sections from function attributes.
for (Module::iterator F = M.begin(), e = M.end(); F != e; ++F)
if (!F->isDeclaration() && !F->hasAvailableExternallyLinkage())
- TextSections.insert(TLOFMacho.SectionForGlobal(F, Mang, TM));
+ TextSections.insert(TLOFMacho.SectionForGlobal(F, *Mang, TM));
// Now the coalescable sections.
TextSections.insert(TLOFMacho.getTextCoalSection());
TextSections.insert(TLOFMacho.getConstTextCoalSection());
diff --git a/lib/Target/ARM/ARMTargetObjectFile.cpp b/lib/Target/ARM/ARMTargetObjectFile.cpp
index e6b8cce091..9ada6a8c20 100644
--- a/lib/Target/ARM/ARMTargetObjectFile.cpp
+++ b/lib/Target/ARM/ARMTargetObjectFile.cpp
@@ -42,12 +42,12 @@ void ARMElfTargetObjectFile::Initialize(MCContext &Ctx,
}
const MCExpr *ARMElfTargetObjectFile::
-getTTypeGlobalReference(const GlobalValue *GV, Mangler *Mang,
+getTTypeGlobalReference(const GlobalValue *GV, Mangler &Mang,
MachineModuleInfo *MMI, unsigned Encoding,
MCStreamer &Streamer) const {
assert(Encoding == DW_EH_PE_absptr && "Can handle absptr encoding only");
- return MCSymbolRefExpr::Create(getSymbol(*Mang, GV),
+ return MCSymbolRefExpr::Create(getSymbol(Mang, GV),
MCSymbolRefExpr::VK_ARM_TARGET2,
getContext());
}
diff --git a/lib/Target/ARM/ARMTargetObjectFile.h b/lib/Target/ARM/ARMTargetObjectFile.h
index b3460c491b..9ee1324e68 100644
--- a/lib/Target/ARM/ARMTargetObjectFile.h
+++ b/lib/Target/ARM/ARMTargetObjectFile.h
@@ -28,7 +28,7 @@ public:
void Initialize(MCContext &Ctx, const TargetMachine &TM) LLVM_OVERRIDE;
- const MCExpr *getTTypeGlobalReference(const GlobalValue *GV, Mangler *Mang,
+ const MCExpr *getTTypeGlobalReference(const GlobalValue *GV, Mangler &Mang,
MachineModuleInfo *MMI,
unsigned Encoding,
MCStreamer &Streamer) const
diff --git a/lib/Target/Hexagon/HexagonTargetObjectFile.cpp b/lib/Target/Hexagon/HexagonTargetObjectFile.cpp
index 7773cff2d2..c97526eed2 100644
--- a/lib/Target/Hexagon/HexagonTargetObjectFile.cpp
+++ b/lib/Target/Hexagon/HexagonTargetObjectFile.cpp
@@ -85,9 +85,10 @@ IsGlobalInSmallSection(const GlobalValue *GV, const TargetMachine &TM,
return false;
}
-const MCSection *HexagonTargetObjectFile::
-SelectSectionForGlobal(const GlobalValue *GV, SectionKind Kind,
- Mangler *Mang, const TargetMachine &TM) const {
+const MCSection *
+HexagonTargetObjectFile::SelectSectionForGlobal(const GlobalValue *GV,
+ SectionKind Kind, Mangler &Mang,
+ const TargetMachine &TM) const {
// Handle Small Section classification here.
if (Kind.isBSS() && IsGlobalInSmallSection(GV, TM, Kind))
diff --git a/lib/Target/Hexagon/HexagonTargetObjectFile.h b/lib/Target/Hexagon/HexagonTargetObjectFile.h
index 73fa47975b..fdc24a6b20 100644
--- a/lib/Target/Hexagon/HexagonTargetObjectFile.h
+++ b/lib/Target/Hexagon/HexagonTargetObjectFile.h
@@ -31,7 +31,7 @@ namespace llvm {
bool IsSmallDataEnabled () const;
const MCSection *SelectSectionForGlobal(const GlobalValue *GV,
- SectionKind Kind, Mangler *Mang,
+ SectionKind Kind, Mangler &Mang,
const TargetMachine &TM) const
LLVM_OVERRIDE;
};
diff --git a/lib/Target/Mips/MipsTargetObjectFile.cpp b/lib/Target/Mips/MipsTargetObjectFile.cpp
index a476c5c324..13f9408f4e 100644
--- a/lib/Target/Mips/MipsTargetObjectFile.cpp
+++ b/lib/Target/Mips/MipsTargetObjectFile.cpp
@@ -88,7 +88,7 @@ IsGlobalInSmallSection(const GlobalValue *GV, const TargetMachine &TM,
const MCSection *MipsTargetObjectFile::
SelectSectionForGlobal(const GlobalValue *GV, SectionKind Kind,
- Mangler *Mang, const TargetMachine &TM) const {
+ Mangler &Mang, const TargetMachine &TM) const {
// TODO: Could also support "weak" symbols as well with ".gnu.linkonce.s.*"
// sections?
diff --git a/lib/Target/Mips/MipsTargetObjectFile.h b/lib/Target/Mips/MipsTargetObjectFile.h
index 11d70db5ba..d61e8fd038 100644
--- a/lib/Target/Mips/MipsTargetObjectFile.h
+++ b/lib/Target/Mips/MipsTargetObjectFile.h
@@ -30,7 +30,7 @@ namespace llvm {
const TargetMachine &TM) const;
const MCSection *SelectSectionForGlobal(const GlobalValue *GV,
- SectionKind Kind, Mangler *Mang,
+ SectionKind Kind, Mangler &Mang,
const TargetMachine &TM) const
LLVM_OVERRIDE;
};
diff --git a/lib/Target/NVPTX/NVPTXTargetObjectFile.h b/lib/Target/NVPTX/NVPTXTargetObjectFile.h
index 31a3c1bd95..4872fc484f 100644
--- a/lib/Target/NVPTX/NVPTXTargetObjectFile.h
+++ b/lib/Target/NVPTX/NVPTXTargetObjectFile.h
@@ -92,7 +92,7 @@ public:
}
const MCSection *getExplicitSectionGlobal(const GlobalValue *GV,
- SectionKind Kind, Mangler *Mang,
+ SectionKind Kind, Mangler &Mang,
const TargetMachine &TM) const
LLVM_OVERRIDE {
return DataSection;
diff --git a/lib/Target/PowerPC/PPCTargetObjectFile.cpp b/lib/Target/PowerPC/PPCTargetObjectFile.cpp
index 32678674f9..2e8605c15e 100644
--- a/lib/Target/PowerPC/PPCTargetObjectFile.cpp
+++ b/lib/Target/PowerPC/PPCTargetObjectFile.cpp
@@ -22,9 +22,9 @@ Initialize(MCContext &Ctx, const TargetMachine &TM) {
InitializeELF(TM.Options.UseInitArray);
}
-const MCSection * PPC64LinuxTargetObjectFile::
-SelectSectionForGlobal(const GlobalValue *GV, SectionKind Kind,
- Mangler *Mang, const TargetMachine &TM) const {
+const MCSection *PPC64LinuxTargetObjectFile::SelectSectionForGlobal(
+ const GlobalValue *GV, SectionKind Kind, Mangler &Mang,
+ const TargetMachine &TM) const {
const MCSection *DefaultSection =
TargetLoweringObjectFileELF::SelectSectionForGlobal(GV, Kind, Mang, TM);
diff --git a/lib/Target/PowerPC/PPCTargetObjectFile.h b/lib/Target/PowerPC/PPCTargetObjectFile.h
index 8042a790f7..475ebd8a71 100644
--- a/lib/Target/PowerPC/PPCTargetObjectFile.h
+++ b/lib/Target/PowerPC/PPCTargetObjectFile.h
@@ -23,7 +23,7 @@ namespace llvm {
void Initialize(MCContext &Ctx, const TargetMachine &TM) LLVM_OVERRIDE;
const MCSection *SelectSectionForGlobal(const GlobalValue *GV,
- SectionKind Kind, Mangler *Mang,
+ SectionKind Kind, Mangler &Mang,
const TargetMachine &TM) const
LLVM_OVERRIDE;
diff --git a/lib/Target/Sparc/SparcTargetObjectFile.cpp b/lib/Target/Sparc/SparcTargetObjectFile.cpp
index 4913ea75fd..f7cefd0b63 100644
--- a/lib/Target/Sparc/SparcTargetObjectFile.cpp
+++ b/lib/Target/Sparc/SparcTargetObjectFile.cpp
@@ -16,20 +16,20 @@ using namespace llvm;
const MCExpr *SparcELFTargetObjectFile::
-getTTypeGlobalReference(const GlobalValue *GV, Mangler *Mang,
+getTTypeGlobalReference(const GlobalValue *GV, Mangler &Mang,
MachineModuleInfo *MMI, unsigned Encoding,
MCStreamer &Streamer) const {
if (Encoding & dwarf::DW_EH_PE_pcrel) {
MachineModuleInfoELF &ELFMMI = MMI->getObjFileInfo<MachineModuleInfoELF>();
- MCSymbol *SSym = getSymbolWithGlobalValueBase(*Mang, GV, ".DW.stub");
+ MCSymbol *SSym = getSymbolWithGlobalValueBase(Mang, GV, ".DW.stub");
// Add information about the stub reference to ELFMMI so that the stub
// gets emitted by the asmprinter.
MachineModuleInfoImpl::StubValueTy &StubSym = ELFMMI.getGVStubEntry(SSym);
if (StubSym.getPointer() == 0) {
- MCSymbol *Sym = getSymbol(*Mang, GV);
+ MCSymbol *Sym = getSymbol(Mang, GV);
StubSym = MachineModuleInfoImpl::StubValueTy(Sym, !GV->hasLocalLinkage());
}
diff --git a/lib/Target/Sparc/SparcTargetObjectFile.h b/lib/Target/Sparc/SparcTargetObjectFile.h
index 5884e5d97a..fb97bdac8e 100644
--- a/lib/Target/Sparc/SparcTargetObjectFile.h
+++ b/lib/Target/Sparc/SparcTargetObjectFile.h
@@ -23,7 +23,7 @@ public:
TargetLoweringObjectFileELF()
{}
- const MCExpr *getTTypeGlobalReference(const GlobalValue *GV, Mangler *Mang,
+ const MCExpr *getTTypeGlobalReference(const GlobalValue *GV, Mangler &Mang,
MachineModuleInfo *MMI,
unsigned Encoding,
MCStreamer &Streamer) const
diff --git a/lib/Target/TargetLoweringObjectFile.cpp b/lib/Target/TargetLoweringObjectFile.cpp
index b62577e080..8c98dd87b6 100644
--- a/lib/Target/TargetLoweringObjectFile.cpp
+++ b/lib/Target/TargetLoweringObjectFile.cpp
@@ -120,9 +120,9 @@ MCSymbol *TargetLoweringObjectFile::getSymbolWithGlobalValueBase(
}
MCSymbol *TargetLoweringObjectFile::
-getCFIPersonalitySymbol(const GlobalValue *GV, Mangler *Mang,
+getCFIPersonalitySymbol(const GlobalValue *GV, Mangler &Mang,
MachineModuleInfo *MMI) const {
- return getSymbol(*Mang, GV);
+ return getSymbol(Mang, GV);
}
void TargetLoweringObjectFile::emitPersonalityValue(MCStreamer &Streamer,
@@ -264,7 +264,7 @@ SectionKind TargetLoweringObjectFile::getKindForGlobal(const GlobalValue *GV,
/// the specified global variable or function definition. This should not
/// be passed external (or available externally) globals.
const MCSection *TargetLoweringObjectFile::
-SectionForGlobal(const GlobalValue *GV, SectionKind Kind, Mangler *Mang,
+SectionForGlobal(const GlobalValue *GV, SectionKind Kind, Mangler &Mang,
const TargetMachine &TM) const {
// Select section name.
if (GV->hasSection())
@@ -280,7 +280,7 @@ SectionForGlobal(const GlobalValue *GV, SectionKind Kind, Mangler *Mang,
const MCSection *
TargetLoweringObjectFile::SelectSectionForGlobal(const GlobalValue *GV,
SectionKind Kind,
- Mangler *Mang,
+ Mangler &Mang,
const TargetMachine &TM) const{
assert(!Kind.isThreadLocal() && "Doesn't support TLS");
@@ -311,11 +311,11 @@ TargetLoweringObjectFile::getSectionForConstant(SectionKind Kind) const {
/// reference to the specified global variable from exception
/// handling information.
const MCExpr *TargetLoweringObjectFile::
-getTTypeGlobalReference(const GlobalValue *GV, Mangler *Mang,
+getTTypeGlobalReference(const GlobalValue *GV, Mangler &Mang,
MachineModuleInfo *MMI, unsigned Encoding,
MCStreamer &Streamer) const {
const MCSymbolRefExpr *Ref =
- MCSymbolRefExpr::Create(getSymbol(*Mang, GV), getContext());
+ MCSymbolRefExpr::Create(getSymbol(Mang, GV), getContext());
return getTTypeReference(Ref, Encoding, Streamer);
}
diff --git a/lib/Target/X86/X86TargetObjectFile.cpp b/lib/Target/X86/X86TargetObjectFile.cpp
index bc1064e17f..bf28495c80 100644
--- a/lib/Target/X86/X86TargetObjectFile.cpp
+++ b/lib/Target/X86/X86TargetObjectFile.cpp
@@ -19,14 +19,14 @@ using namespace llvm;
using namespace dwarf;
const MCExpr *X86_64MachoTargetObjectFile::
-getTTypeGlobalReference(const GlobalValue *GV, Mangler *Mang,
+getTTypeGlobalReference(const GlobalValue *GV, Mangler &Mang,
MachineModuleInfo *MMI, unsigned Encoding,
MCStreamer &Streamer) const {
// On Darwin/X86-64, we can reference dwarf symbols with foo@GOTPCREL+4, which
// is an indirect pc-relative reference.
if (Encoding & (DW_EH_PE_indirect | DW_EH_PE_pcrel)) {
- const MCSymbol *Sym = getSymbol(*Mang, GV);
+ const MCSymbol *Sym = getSymbol(Mang, GV);
const MCExpr *Res =
MCSymbolRefExpr::Create(Sym, MCSymbolRefExpr::VK_GOTPCREL, getContext());
const MCExpr *Four = MCConstantExpr::Create(4, getContext());
@@ -38,9 +38,9 @@ getTTypeGlobalReference(const GlobalValue *GV, Mangler *Mang,
}
MCSymbol *X86_64MachoTargetObjectFile::
-getCFIPersonalitySymbol(const GlobalValue *GV, Mangler *Mang,
+getCFIPersonalitySymbol(const GlobalValue *GV, Mangler &Mang,
MachineModuleInfo *MMI) const {
- return getSymbol(*Mang, GV);
+ return getSymbol(Mang, GV);
}
void
@@ -57,7 +57,7 @@ X86LinuxTargetObjectFile::getDebugThreadLocalSymbol(
const MCExpr *
X86WindowsTargetObjectFile::getExecutableRelativeSymbol(const ConstantExpr *CE,
- Mangler *Mang) const {
+ Mangler &Mang) const {
// We are looking for the difference of two symbols, need a subtraction
// operation.
const SubOperator *Sub = dyn_cast<SubOperator>(CE);
@@ -103,5 +103,5 @@ X86WindowsTargetObjectFile::getExecutableRelativeSymbol(const ConstantExpr *CE,
return 0;
return MCSymbolRefExpr::Create(
- getSymbol(*Mang, GVLHS), MCSymbolRefExpr::VK_COFF_IMGREL32, getContext());
+ getSymbol(Mang, GVLHS), MCSymbolRefExpr::VK_COFF_IMGREL32, getContext());
}
diff --git a/lib/Target/X86/X86TargetObjectFile.h b/lib/Target/X86/X86TargetObjectFile.h
index 77046e2b42..6220b9acf9 100644
--- a/lib/Target/X86/X86TargetObjectFile.h
+++ b/lib/Target/X86/X86TargetObjectFile.h
@@ -20,7 +20,7 @@ namespace llvm {
/// x86-64.
class X86_64MachoTargetObjectFile : public TargetLoweringObjectFileMachO {
public:
- const MCExpr *getTTypeGlobalReference(const GlobalValue *GV, Mangler *Mang,
+ const MCExpr *getTTypeGlobalReference(const GlobalValue *GV, Mangler &Mang,
MachineModuleInfo *MMI,
unsigned Encoding,
MCStreamer &Streamer) const
@@ -28,7 +28,7 @@ namespace llvm {
// getCFIPersonalitySymbol - The symbol that gets passed to
// .cfi_personality.
- MCSymbol *getCFIPersonalitySymbol(const GlobalValue *GV, Mangler *Mang,
+ MCSymbol *getCFIPersonalitySymbol(const GlobalValue *GV, Mangler &Mang,
MachineModuleInfo *MMI) const
LLVM_OVERRIDE;
};
@@ -46,7 +46,7 @@ namespace llvm {
/// \brief This implementation is used for Windows targets on x86 and x86-64.
class X86WindowsTargetObjectFile : public TargetLoweringObjectFileCOFF {
const MCExpr *getExecutableRelativeSymbol(const ConstantExpr *CE,
- Mangler *Mang) const
+ Mangler &Mang) const
LLVM_OVERRIDE;
};
diff --git a/lib/Target/XCore/XCoreAsmPrinter.cpp b/lib/Target/XCore/XCoreAsmPrinter.cpp
index fe030fa4c2..1edd33c5f0 100644
--- a/lib/Target/XCore/XCoreAsmPrinter.cpp
+++ b/lib/Target/XCore/XCoreAsmPrinter.cpp
@@ -113,9 +113,9 @@ void XCoreAsmPrinter::EmitGlobalVariable(const GlobalVariable *GV) {
return;
const DataLayout *TD = TM.getDataLayout();
- OutStreamer.SwitchSection(getObjFileLowering().SectionForGlobal(GV, Mang,TM));
+ OutStreamer.SwitchSection(
+ getObjFileLowering().SectionForGlobal(GV, *Mang, TM));
-
MCSymbol *GVSym = getSymbol(GV);
const Constant *C = GV->getInitializer();
unsigned Align = (unsigned)TD->getPreferredTypeAlignmentShift(C->getType());
diff --git a/lib/Target/XCore/XCoreTargetObjectFile.cpp b/lib/Target/XCore/XCoreTargetObjectFile.cpp
index 61eb2b51f3..cf565e7a1e 100644
--- a/lib/Target/XCore/XCoreTargetObjectFile.cpp
+++ b/lib/Target/XCore/XCoreTargetObjectFile.cpp
@@ -120,7 +120,7 @@ static unsigned getXCoreSectionFlags(SectionKind K) {
const MCSection *XCoreTargetObjectFile::
getExplicitSectionGlobal(const GlobalValue *GV, SectionKind Kind,
- Mangler *Mang, const TargetMachine &TM) const {
+ Mangler &Mang, const TargetMachine &TM) const {
StringRef SectionName = GV->getSection();
// Infer section flags from the section name if we can.
Kind = getXCoreKindForNamedSection(SectionName, Kind);
@@ -129,7 +129,7 @@ getExplicitSectionGlobal(const GlobalValue *GV, SectionKind Kind,
}
const MCSection *XCoreTargetObjectFile::
-SelectSectionForGlobal(const GlobalValue *GV, SectionKind Kind, Mangler *Mang,
+SelectSectionForGlobal(const GlobalValue *GV, SectionKind Kind, Mangler &Mang,
const TargetMachine &TM) const{
if (Kind.isText()) return TextSection;
if (Kind.isMergeable1ByteCString()) return CStringSection;
diff --git a/lib/Target/XCore/XCoreTargetObjectFile.h b/lib/Target/XCore/XCoreTargetObjectFile.h
index fee84256b8..47d7fad8ee 100644
--- a/lib/Target/XCore/XCoreTargetObjectFile.h
+++ b/lib/Target/XCore/XCoreTargetObjectFile.h
@@ -24,12 +24,12 @@ static const unsigned CodeModelLargeSize = 256;
void Initialize(MCContext &Ctx, const TargetMachine &TM);
const MCSection *getExplicitSectionGlobal(const GlobalValue *GV,
- SectionKind Kind, Mangler *Mang,
+ SectionKind Kind, Mangler &Mang,
const TargetMachine &TM) const
LLVM_OVERRIDE;
const MCSection *SelectSectionForGlobal(const GlobalValue *GV,
- SectionKind Kind, Mangler *Mang,
+ SectionKind Kind, Mangler &Mang,
const TargetMachine &TM) const
LLVM_OVERRIDE;