[llvm] r201025 - Pass the Mangler by reference.
Rafael Espindola
rafael.espindola at gmail.com
Sat Feb 8 06:53:29 PST 2014
Author: rafael
Date: Sat Feb 8 08:53:28 2014
New Revision: 201025
URL: http://llvm.org/viewvc/llvm-project?rev=201025&view=rev
Log:
Pass the Mangler by reference.
It is never null and it is not used in casts, so there is no reason to use a
pointer. This matches how we pass TM.
Modified:
llvm/trunk/include/llvm/CodeGen/TargetLoweringObjectFileImpl.h
llvm/trunk/include/llvm/Target/TargetLoweringObjectFile.h
llvm/trunk/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
llvm/trunk/lib/CodeGen/AsmPrinter/AsmPrinterDwarf.cpp
llvm/trunk/lib/CodeGen/AsmPrinter/DwarfCFIException.cpp
llvm/trunk/lib/CodeGen/AsmPrinter/Win64Exception.cpp
llvm/trunk/lib/CodeGen/TargetLoweringObjectFileImpl.cpp
llvm/trunk/lib/Target/ARM/ARMAsmPrinter.cpp
llvm/trunk/lib/Target/ARM/ARMTargetObjectFile.cpp
llvm/trunk/lib/Target/ARM/ARMTargetObjectFile.h
llvm/trunk/lib/Target/Hexagon/HexagonTargetObjectFile.cpp
llvm/trunk/lib/Target/Hexagon/HexagonTargetObjectFile.h
llvm/trunk/lib/Target/Mips/MipsTargetObjectFile.cpp
llvm/trunk/lib/Target/Mips/MipsTargetObjectFile.h
llvm/trunk/lib/Target/NVPTX/NVPTXTargetObjectFile.h
llvm/trunk/lib/Target/PowerPC/PPCTargetObjectFile.cpp
llvm/trunk/lib/Target/PowerPC/PPCTargetObjectFile.h
llvm/trunk/lib/Target/Sparc/SparcTargetObjectFile.cpp
llvm/trunk/lib/Target/Sparc/SparcTargetObjectFile.h
llvm/trunk/lib/Target/TargetLoweringObjectFile.cpp
llvm/trunk/lib/Target/X86/X86TargetObjectFile.cpp
llvm/trunk/lib/Target/X86/X86TargetObjectFile.h
llvm/trunk/lib/Target/XCore/XCoreAsmPrinter.cpp
llvm/trunk/lib/Target/XCore/XCoreTargetObjectFile.cpp
llvm/trunk/lib/Target/XCore/XCoreTargetObjectFile.h
Modified: llvm/trunk/include/llvm/CodeGen/TargetLoweringObjectFileImpl.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/CodeGen/TargetLoweringObjectFileImpl.h?rev=201025&r1=201024&r2=201025&view=diff
==============================================================================
--- llvm/trunk/include/llvm/CodeGen/TargetLoweringObjectFileImpl.h (original)
+++ llvm/trunk/include/llvm/CodeGen/TargetLoweringObjectFileImpl.h Sat Feb 8 08:53:28 2014
@@ -46,25 +46,25 @@ public:
const MCSection *getSectionForConstant(SectionKind Kind) const LLVM_OVERRIDE;
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;
/// Return an MCExpr to use for a reference to the specified type info global
/// variable from exception handling information.
- const MCExpr *getTTypeGlobalReference(const GlobalValue *GV, Mangler *Mang,
+ const MCExpr *getTTypeGlobalReference(const GlobalValue *GV, Mangler &Mang,
MachineModuleInfo *MMI,
unsigned Encoding,
MCStreamer &Streamer) const
LLVM_OVERRIDE;
// 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;
void InitializeELF(bool UseInitArray_);
@@ -87,16 +87,16 @@ public:
/// Emit the module flags that specify the garbage collection information.
void emitModuleFlags(MCStreamer &Streamer,
ArrayRef<Module::ModuleFlagEntry> ModuleFlags,
- Mangler *Mang, const TargetMachine &TM) const
+ 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;
const MCSection *getExplicitSectionGlobal(const GlobalValue *GV,
- SectionKind Kind, Mangler *Mang,
+ SectionKind Kind, Mangler &Mang,
const TargetMachine &TM) const
LLVM_OVERRIDE;
@@ -105,18 +105,18 @@ public:
/// This hook allows targets to selectively decide not to emit the
/// UsedDirective for some symbols in llvm.used.
/// FIXME: REMOVE this (rdar://7071300)
- bool shouldEmitUsedDirectiveFor(const GlobalValue *GV, Mangler *Mang) const
+ bool shouldEmitUsedDirectiveFor(const GlobalValue *GV, Mangler &Mang) const
LLVM_OVERRIDE;
/// The mach-o version of this method defaults to returning a stub reference.
- const MCExpr *getTTypeGlobalReference(const GlobalValue *GV, Mangler *Mang,
+ const MCExpr *getTTypeGlobalReference(const GlobalValue *GV, Mangler &Mang,
MachineModuleInfo *MMI,
unsigned Encoding,
MCStreamer &Streamer) const
LLVM_OVERRIDE;
// 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;
};
@@ -127,12 +127,12 @@ public:
virtual ~TargetLoweringObjectFileCOFF() {}
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;
@@ -144,7 +144,7 @@ public:
/// emission is implemented for COFF.
void emitModuleFlags(MCStreamer &Streamer,
ArrayRef<Module::ModuleFlagEntry> ModuleFlags,
- Mangler *Mang, const TargetMachine &TM) const
+ Mangler &Mang, const TargetMachine &TM) const
LLVM_OVERRIDE;
};
Modified: llvm/trunk/include/llvm/Target/TargetLoweringObjectFile.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Target/TargetLoweringObjectFile.h?rev=201025&r1=201024&r2=201025&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Target/TargetLoweringObjectFile.h (original)
+++ llvm/trunk/include/llvm/Target/TargetLoweringObjectFile.h Sat Feb 8 08:53:28 2014
@@ -64,16 +64,15 @@ public:
}
/// Emit the module flags that the platform cares about.
- virtual void emitModuleFlags(MCStreamer &,
- ArrayRef<Module::ModuleFlagEntry>,
- Mangler *, const TargetMachine &) const {
- }
+ virtual void emitModuleFlags(MCStreamer &Streamer,
+ ArrayRef<Module::ModuleFlagEntry> Flags,
+ Mangler &Mang, const TargetMachine &TM) const {}
/// This hook allows targets to selectively decide not to emit the
/// UsedDirective for some symbols in llvm.used.
/// FIXME: REMOVE this (rdar://7071300)
virtual bool shouldEmitUsedDirectiveFor(const GlobalValue *GV,
- Mangler *) const {
+ Mangler &Mang) const {
return GV != 0;
}
@@ -90,14 +89,14 @@ public:
/// variable or function definition. This should not be passed external (or
/// available externally) globals.
const MCSection *SectionForGlobal(const GlobalValue *GV,
- SectionKind Kind, Mangler *Mang,
+ SectionKind Kind, Mangler &Mang,
const TargetMachine &TM) const;
/// This method computes the appropriate section to emit the specified global
/// variable or function definition. This should not be passed external (or
/// available externally) globals.
const MCSection *SectionForGlobal(const GlobalValue *GV,
- Mangler *Mang,
+ Mangler &Mang,
const TargetMachine &TM) const {
return SectionForGlobal(GV, getKindForGlobal(GV, TM), Mang, TM);
}
@@ -107,11 +106,11 @@ public:
/// assume that GV->hasSection() is true.
virtual const MCSection *
getExplicitSectionGlobal(const GlobalValue *GV, SectionKind Kind,
- Mangler *Mang, const TargetMachine &TM) const = 0;
+ Mangler &Mang, const TargetMachine &TM) const = 0;
/// Allow the target to completely override section assignment of a global.
virtual const MCSection *
- getSpecialCasedSectionGlobals(const GlobalValue *GV, Mangler *Mang,
+ getSpecialCasedSectionGlobals(const GlobalValue *GV, Mangler &Mang,
SectionKind Kind) const {
return 0;
}
@@ -119,7 +118,7 @@ public:
/// Return an MCExpr to use for a reference to the specified global variable
/// from exception handling information.
virtual const MCExpr *
- getTTypeGlobalReference(const GlobalValue *GV, Mangler *Mang,
+ getTTypeGlobalReference(const GlobalValue *GV, Mangler &Mang,
MachineModuleInfo *MMI, unsigned Encoding,
MCStreamer &Streamer) const;
@@ -134,7 +133,7 @@ public:
// The symbol that gets passed to .cfi_personality.
virtual MCSymbol *
- getCFIPersonalitySymbol(const GlobalValue *GV, Mangler *Mang,
+ getCFIPersonalitySymbol(const GlobalValue *GV, Mangler &Mang,
MachineModuleInfo *MMI) const;
const MCExpr *
@@ -157,14 +156,14 @@ public:
virtual const MCExpr *getDebugThreadLocalSymbol(const MCSymbol *Sym) const;
virtual const MCExpr *
- getExecutableRelativeSymbol(const ConstantExpr *CE, Mangler *Mang) const {
+ getExecutableRelativeSymbol(const ConstantExpr *CE, Mangler &Mang) const {
return 0;
}
protected:
virtual const MCSection *
SelectSectionForGlobal(const GlobalValue *GV, SectionKind Kind,
- Mangler *Mang, const TargetMachine &TM) const;
+ Mangler &Mang, const TargetMachine &TM) const;
};
} // end namespace llvm
Modified: llvm/trunk/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/AsmPrinter/AsmPrinter.cpp?rev=201025&r1=201024&r2=201025&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/AsmPrinter/AsmPrinter.cpp (original)
+++ llvm/trunk/lib/CodeGen/AsmPrinter/AsmPrinter.cpp Sat Feb 8 08:53:28 2014
@@ -372,7 +372,7 @@ void AsmPrinter::EmitGlobalVariable(cons
// Handle local BSS symbols.
if (MAI->hasMachoZeroFillDirective()) {
const MCSection *TheSection =
- getObjFileLowering().SectionForGlobal(GV, GVKind, Mang, TM);
+ getObjFileLowering().SectionForGlobal(GV, GVKind, *Mang, TM);
// .zerofill __DATA, __bss, _foo, 400, 5
OutStreamer.EmitZerofill(TheSection, GVSym, Size, Align);
return;
@@ -401,7 +401,7 @@ void AsmPrinter::EmitGlobalVariable(cons
}
const MCSection *TheSection =
- getObjFileLowering().SectionForGlobal(GV, GVKind, Mang, TM);
+ getObjFileLowering().SectionForGlobal(GV, GVKind, *Mang, TM);
// Handle the zerofill directive on darwin, which is a special form of BSS
// emission.
@@ -492,7 +492,8 @@ void AsmPrinter::EmitFunctionHeader() {
// Print the 'header' of function.
const Function *F = MF->getFunction();
- OutStreamer.SwitchSection(getObjFileLowering().SectionForGlobal(F, Mang, TM));
+ OutStreamer.SwitchSection(
+ getObjFileLowering().SectionForGlobal(F, *Mang, TM));
EmitVisibility(CurrentFnSym, F->getVisibility());
EmitLinkage(F, CurrentFnSym);
@@ -935,7 +936,7 @@ bool AsmPrinter::doFinalization(Module &
SmallVector<Module::ModuleFlagEntry, 8> ModuleFlags;
M.getModuleFlagsMetadata(ModuleFlags);
if (!ModuleFlags.empty())
- getObjFileLowering().emitModuleFlags(OutStreamer, ModuleFlags, Mang, TM);
+ getObjFileLowering().emitModuleFlags(OutStreamer, ModuleFlags, *Mang, TM);
// Make sure we wrote out everything we need.
OutStreamer.Flush();
@@ -1155,7 +1156,8 @@ void AsmPrinter::EmitJumpTableInfo() {
// FIXME: this isn't the right predicate, should be based on the MCSection
// for the function.
F->isWeakForLinker()) {
- OutStreamer.SwitchSection(getObjFileLowering().SectionForGlobal(F,Mang,TM));
+ OutStreamer.SwitchSection(
+ getObjFileLowering().SectionForGlobal(F, *Mang, TM));
} else {
// Otherwise, drop it in the readonly section.
const MCSection *ReadOnlySection =
@@ -1339,7 +1341,7 @@ void AsmPrinter::EmitLLVMUsedList(const
for (unsigned i = 0, e = InitList->getNumOperands(); i != e; ++i) {
const GlobalValue *GV =
dyn_cast<GlobalValue>(InitList->getOperand(i)->stripPointerCasts());
- if (GV && getObjFileLowering().shouldEmitUsedDirectiveFor(GV, Mang))
+ if (GV && getObjFileLowering().shouldEmitUsedDirectiveFor(GV, *Mang))
OutStreamer.EmitSymbolAttribute(getSymbol(GV), MCSA_NoDeadStrip);
}
}
@@ -1544,7 +1546,7 @@ static const MCExpr *lowerConstant(const
}
if (const MCExpr *RelocExpr =
- AP.getObjFileLowering().getExecutableRelativeSymbol(CE, AP.Mang))
+ AP.getObjFileLowering().getExecutableRelativeSymbol(CE, *AP.Mang))
return RelocExpr;
switch (CE->getOpcode()) {
Modified: llvm/trunk/lib/CodeGen/AsmPrinter/AsmPrinterDwarf.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/AsmPrinter/AsmPrinterDwarf.cpp?rev=201025&r1=201024&r2=201025&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/AsmPrinter/AsmPrinterDwarf.cpp (original)
+++ llvm/trunk/lib/CodeGen/AsmPrinter/AsmPrinterDwarf.cpp Sat Feb 8 08:53:28 2014
@@ -143,7 +143,7 @@ void AsmPrinter::EmitTTypeReference(cons
const TargetLoweringObjectFile &TLOF = getObjFileLowering();
const MCExpr *Exp =
- TLOF.getTTypeGlobalReference(GV, Mang, MMI, Encoding, OutStreamer);
+ TLOF.getTTypeGlobalReference(GV, *Mang, MMI, Encoding, OutStreamer);
OutStreamer.EmitValue(Exp, GetSizeOfEncodedValue(Encoding));
} else
OutStreamer.EmitIntValue(0, GetSizeOfEncodedValue(Encoding));
Modified: llvm/trunk/lib/CodeGen/AsmPrinter/DwarfCFIException.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/AsmPrinter/DwarfCFIException.cpp?rev=201025&r1=201024&r2=201025&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/AsmPrinter/DwarfCFIException.cpp (original)
+++ llvm/trunk/lib/CodeGen/AsmPrinter/DwarfCFIException.cpp Sat Feb 8 08:53:28 2014
@@ -119,7 +119,7 @@ void DwarfCFIException::beginFunction(co
if (!shouldEmitPersonality)
return;
- const MCSymbol *Sym = TLOF.getCFIPersonalitySymbol(Per, Asm->Mang, MMI);
+ const MCSymbol *Sym = TLOF.getCFIPersonalitySymbol(Per, *Asm->Mang, MMI);
Asm->OutStreamer.EmitCFIPersonality(Sym, PerEncoding);
Asm->OutStreamer.EmitDebugLabel
Modified: llvm/trunk/lib/CodeGen/AsmPrinter/Win64Exception.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/AsmPrinter/Win64Exception.cpp?rev=201025&r1=201024&r2=201025&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/AsmPrinter/Win64Exception.cpp (original)
+++ llvm/trunk/lib/CodeGen/AsmPrinter/Win64Exception.cpp Sat Feb 8 08:53:28 2014
@@ -101,7 +101,7 @@ void Win64Exception::endFunction(const M
if (shouldEmitPersonality) {
const TargetLoweringObjectFile &TLOF = Asm->getObjFileLowering();
const Function *Per = MMI->getPersonalities()[MMI->getPersonalityIndex()];
- const MCSymbol *Sym = TLOF.getCFIPersonalitySymbol(Per, Asm->Mang, MMI);
+ const MCSymbol *Sym = TLOF.getCFIPersonalitySymbol(Per, *Asm->Mang, MMI);
Asm->OutStreamer.PushSection();
Asm->OutStreamer.EmitWin64EHHandlerData();
Modified: llvm/trunk/lib/CodeGen/TargetLoweringObjectFileImpl.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/TargetLoweringObjectFileImpl.cpp?rev=201025&r1=201024&r2=201025&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/TargetLoweringObjectFileImpl.cpp (original)
+++ llvm/trunk/lib/CodeGen/TargetLoweringObjectFileImpl.cpp Sat Feb 8 08:53:28 2014
@@ -45,17 +45,17 @@ using namespace dwarf;
MCSymbol *
TargetLoweringObjectFileELF::getCFIPersonalitySymbol(const GlobalValue *GV,
- Mangler *Mang,
+ Mangler &Mang,
MachineModuleInfo *MMI) const {
unsigned Encoding = getPersonalityEncoding();
switch (Encoding & 0x70) {
default:
report_fatal_error("We do not support this DWARF encoding yet!");
case dwarf::DW_EH_PE_absptr:
- return getSymbol(*Mang, GV);
+ return getSymbol(Mang, GV);
case dwarf::DW_EH_PE_pcrel: {
return getContext().GetOrCreateSymbol(StringRef("DW.ref.") +
- getSymbol(*Mang, GV)->getName());
+ getSymbol(Mang, GV)->getName());
}
}
}
@@ -88,20 +88,20 @@ void TargetLoweringObjectFileELF::emitPe
}
const MCExpr *TargetLoweringObjectFileELF::
-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_indirect) {
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());
}
@@ -199,7 +199,7 @@ getELFSectionFlags(SectionKind K) {
const MCSection *TargetLoweringObjectFileELF::
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.
@@ -232,7 +232,7 @@ static const char *getSectionPrefixForGl
const MCSection *TargetLoweringObjectFileELF::
SelectSectionForGlobal(const GlobalValue *GV, SectionKind Kind,
- Mangler *Mang, const TargetMachine &TM) const {
+ Mangler &Mang, const TargetMachine &TM) const {
// If we have -ffunction-section or -fdata-section then we should emit the
// global value to a uniqued section specifically for it.
bool EmitUniquedSection;
@@ -249,7 +249,7 @@ SelectSectionForGlobal(const GlobalValue
Prefix = getSectionPrefixForGlobal(Kind);
SmallString<128> Name(Prefix, Prefix+strlen(Prefix));
- MCSymbol *Sym = getSymbol(*Mang, GV);
+ MCSymbol *Sym = getSymbol(Mang, GV);
Name.append(Sym->getName().begin(), Sym->getName().end());
StringRef Group = "";
unsigned Flags = getELFSectionFlags(Kind);
@@ -416,7 +416,7 @@ getDepLibFromLinkerOpt(StringRef LinkerO
void TargetLoweringObjectFileMachO::
emitModuleFlags(MCStreamer &Streamer,
ArrayRef<Module::ModuleFlagEntry> ModuleFlags,
- Mangler *Mang, const TargetMachine &TM) const {
+ Mangler &Mang, const TargetMachine &TM) const {
unsigned VersionVal = 0;
unsigned ImageInfoFlags = 0;
MDNode *LinkerOptions = 0;
@@ -490,7 +490,7 @@ emitModuleFlags(MCStreamer &Streamer,
const MCSection *TargetLoweringObjectFileMachO::
getExplicitSectionGlobal(const GlobalValue *GV, SectionKind Kind,
- Mangler *Mang, const TargetMachine &TM) const {
+ Mangler &Mang, const TargetMachine &TM) const {
// Parse the section specifier and create it if valid.
StringRef Segment, Section;
unsigned TAA = 0, StubSize = 0;
@@ -529,7 +529,7 @@ getExplicitSectionGlobal(const GlobalVal
const MCSection *TargetLoweringObjectFileMachO::
SelectSectionForGlobal(const GlobalValue *GV, SectionKind Kind,
- Mangler *Mang, const TargetMachine &TM) const {
+ Mangler &Mang, const TargetMachine &TM) const {
// Handle thread local data.
if (Kind.isThreadBSS()) return TLSBSSSection;
@@ -611,7 +611,7 @@ TargetLoweringObjectFileMachO::getSectio
/// not to emit the UsedDirective for some symbols in llvm.used.
// FIXME: REMOVE this (rdar://7071300)
bool TargetLoweringObjectFileMachO::
-shouldEmitUsedDirectiveFor(const GlobalValue *GV, Mangler *Mang) const {
+shouldEmitUsedDirectiveFor(const GlobalValue *GV, Mangler &Mang) const {
/// On Darwin, internally linked data beginning with "L" or "l" does not have
/// the directive emitted (this occurs in ObjC metadata).
if (!GV) return false;
@@ -621,7 +621,7 @@ shouldEmitUsedDirectiveFor(const GlobalV
// FIXME: ObjC metadata is currently emitted as internal symbols that have
// \1L and \0l prefixes on them. Fix them to be Private/LinkerPrivate and
// this horrible hack can go away.
- MCSymbol *Sym = getSymbol(*Mang, GV);
+ MCSymbol *Sym = getSymbol(Mang, GV);
if (Sym->getName()[0] == 'L' || Sym->getName()[0] == 'l')
return false;
}
@@ -630,7 +630,7 @@ shouldEmitUsedDirectiveFor(const GlobalV
}
const MCExpr *TargetLoweringObjectFileMachO::
-getTTypeGlobalReference(const GlobalValue *GV, Mangler *Mang,
+getTTypeGlobalReference(const GlobalValue *GV, Mangler &Mang,
MachineModuleInfo *MMI, unsigned Encoding,
MCStreamer &Streamer) const {
// The mach-o version of this method defaults to returning a stub reference.
@@ -639,7 +639,7 @@ getTTypeGlobalReference(const GlobalValu
MachineModuleInfoMachO &MachOMMI =
MMI->getObjFileInfo<MachineModuleInfoMachO>();
- MCSymbol *SSym = getSymbolWithGlobalValueBase(*Mang, GV, "$non_lazy_ptr");
+ MCSymbol *SSym = getSymbolWithGlobalValueBase(Mang, GV, "$non_lazy_ptr");
// Add information about the stub reference to MachOMMI so that the stub
// gets emitted by the asmprinter.
@@ -647,7 +647,7 @@ getTTypeGlobalReference(const GlobalValu
GV->hasHiddenVisibility() ? MachOMMI.getHiddenGVStubEntry(SSym) :
MachOMMI.getGVStubEntry(SSym);
if (StubSym.getPointer() == 0) {
- MCSymbol *Sym = getSymbol(*Mang, GV);
+ MCSymbol *Sym = getSymbol(Mang, GV);
StubSym = MachineModuleInfoImpl::StubValueTy(Sym, !GV->hasLocalLinkage());
}
@@ -661,19 +661,19 @@ getTTypeGlobalReference(const GlobalValu
}
MCSymbol *TargetLoweringObjectFileMachO::
-getCFIPersonalitySymbol(const GlobalValue *GV, Mangler *Mang,
+getCFIPersonalitySymbol(const GlobalValue *GV, Mangler &Mang,
MachineModuleInfo *MMI) const {
// The mach-o version of this method defaults to returning a stub reference.
MachineModuleInfoMachO &MachOMMI =
MMI->getObjFileInfo<MachineModuleInfoMachO>();
- MCSymbol *SSym = getSymbolWithGlobalValueBase(*Mang, GV, "$non_lazy_ptr");
+ MCSymbol *SSym = getSymbolWithGlobalValueBase(Mang, GV, "$non_lazy_ptr");
// Add information about the stub reference to MachOMMI so that the stub
// gets emitted by the asmprinter.
MachineModuleInfoImpl::StubValueTy &StubSym = MachOMMI.getGVStubEntry(SSym);
if (StubSym.getPointer() == 0) {
- MCSymbol *Sym = getSymbol(*Mang, GV);
+ MCSymbol *Sym = getSymbol(Mang, GV);
StubSym = MachineModuleInfoImpl::StubValueTy(Sym, !GV->hasLocalLinkage());
}
@@ -721,7 +721,7 @@ getCOFFSectionFlags(SectionKind K) {
const MCSection *TargetLoweringObjectFileCOFF::
getExplicitSectionGlobal(const GlobalValue *GV, SectionKind Kind,
- Mangler *Mang, const TargetMachine &TM) const {
+ Mangler &Mang, const TargetMachine &TM) const {
int Selection = 0;
unsigned Characteristics = getCOFFSectionFlags(Kind);
StringRef Name = GV->getSection();
@@ -729,7 +729,7 @@ getExplicitSectionGlobal(const GlobalVal
if (GV->isWeakForLinker()) {
Selection = COFF::IMAGE_COMDAT_SELECT_ANY;
Characteristics |= COFF::IMAGE_SCN_LNK_COMDAT;
- MCSymbol *Sym = getSymbol(*Mang, GV);
+ MCSymbol *Sym = getSymbol(Mang, GV);
COMDATSymName = Sym->getName();
}
return getContext().getCOFFSection(Name,
@@ -754,7 +754,7 @@ static const char *getCOFFSectionNameFor
const MCSection *TargetLoweringObjectFileCOFF::
SelectSectionForGlobal(const GlobalValue *GV, SectionKind Kind,
- Mangler *Mang, const TargetMachine &TM) const {
+ Mangler &Mang, const TargetMachine &TM) const {
// If this global is linkonce/weak and the target handles this by emitting it
// into a 'uniqued' section name, create and return the section now.
@@ -763,7 +763,7 @@ SelectSectionForGlobal(const GlobalValue
unsigned Characteristics = getCOFFSectionFlags(Kind);
Characteristics |= COFF::IMAGE_SCN_LNK_COMDAT;
- MCSymbol *Sym = getSymbol(*Mang, GV);
+ MCSymbol *Sym = getSymbol(Mang, GV);
return getContext().getCOFFSection(Name, Characteristics,
Kind, Sym->getName(),
COFF::IMAGE_COMDAT_SELECT_ANY);
@@ -795,7 +795,7 @@ getDepLibFromLinkerOpt(StringRef LinkerO
void TargetLoweringObjectFileCOFF::
emitModuleFlags(MCStreamer &Streamer,
ArrayRef<Module::ModuleFlagEntry> ModuleFlags,
- Mangler *Mang, const TargetMachine &TM) const {
+ Mangler &Mang, const TargetMachine &TM) const {
MDNode *LinkerOptions = 0;
// Look for the "Linker Options" flag, since it's the only one we support.
Modified: llvm/trunk/lib/Target/ARM/ARMAsmPrinter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/ARMAsmPrinter.cpp?rev=201025&r1=201024&r2=201025&view=diff
==============================================================================
--- llvm/trunk/lib/Target/ARM/ARMAsmPrinter.cpp (original)
+++ llvm/trunk/lib/Target/ARM/ARMAsmPrinter.cpp Sat Feb 8 08:53:28 2014
@@ -474,7 +474,7 @@ void ARMAsmPrinter::EmitStartOfAsmFile(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());
Modified: llvm/trunk/lib/Target/ARM/ARMTargetObjectFile.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/ARMTargetObjectFile.cpp?rev=201025&r1=201024&r2=201025&view=diff
==============================================================================
--- llvm/trunk/lib/Target/ARM/ARMTargetObjectFile.cpp (original)
+++ llvm/trunk/lib/Target/ARM/ARMTargetObjectFile.cpp Sat Feb 8 08:53:28 2014
@@ -42,12 +42,12 @@ void ARMElfTargetObjectFile::Initialize(
}
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());
}
Modified: llvm/trunk/lib/Target/ARM/ARMTargetObjectFile.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/ARMTargetObjectFile.h?rev=201025&r1=201024&r2=201025&view=diff
==============================================================================
--- llvm/trunk/lib/Target/ARM/ARMTargetObjectFile.h (original)
+++ llvm/trunk/lib/Target/ARM/ARMTargetObjectFile.h Sat Feb 8 08:53:28 2014
@@ -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
Modified: llvm/trunk/lib/Target/Hexagon/HexagonTargetObjectFile.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Hexagon/HexagonTargetObjectFile.cpp?rev=201025&r1=201024&r2=201025&view=diff
==============================================================================
--- llvm/trunk/lib/Target/Hexagon/HexagonTargetObjectFile.cpp (original)
+++ llvm/trunk/lib/Target/Hexagon/HexagonTargetObjectFile.cpp Sat Feb 8 08:53:28 2014
@@ -85,9 +85,10 @@ IsGlobalInSmallSection(const GlobalValue
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))
Modified: llvm/trunk/lib/Target/Hexagon/HexagonTargetObjectFile.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Hexagon/HexagonTargetObjectFile.h?rev=201025&r1=201024&r2=201025&view=diff
==============================================================================
--- llvm/trunk/lib/Target/Hexagon/HexagonTargetObjectFile.h (original)
+++ llvm/trunk/lib/Target/Hexagon/HexagonTargetObjectFile.h Sat Feb 8 08:53:28 2014
@@ -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;
};
Modified: llvm/trunk/lib/Target/Mips/MipsTargetObjectFile.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Mips/MipsTargetObjectFile.cpp?rev=201025&r1=201024&r2=201025&view=diff
==============================================================================
--- llvm/trunk/lib/Target/Mips/MipsTargetObjectFile.cpp (original)
+++ llvm/trunk/lib/Target/Mips/MipsTargetObjectFile.cpp Sat Feb 8 08:53:28 2014
@@ -88,7 +88,7 @@ IsGlobalInSmallSection(const GlobalValue
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?
Modified: llvm/trunk/lib/Target/Mips/MipsTargetObjectFile.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Mips/MipsTargetObjectFile.h?rev=201025&r1=201024&r2=201025&view=diff
==============================================================================
--- llvm/trunk/lib/Target/Mips/MipsTargetObjectFile.h (original)
+++ llvm/trunk/lib/Target/Mips/MipsTargetObjectFile.h Sat Feb 8 08:53:28 2014
@@ -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;
};
Modified: llvm/trunk/lib/Target/NVPTX/NVPTXTargetObjectFile.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/NVPTX/NVPTXTargetObjectFile.h?rev=201025&r1=201024&r2=201025&view=diff
==============================================================================
--- llvm/trunk/lib/Target/NVPTX/NVPTXTargetObjectFile.h (original)
+++ llvm/trunk/lib/Target/NVPTX/NVPTXTargetObjectFile.h Sat Feb 8 08:53:28 2014
@@ -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;
Modified: llvm/trunk/lib/Target/PowerPC/PPCTargetObjectFile.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/PowerPC/PPCTargetObjectFile.cpp?rev=201025&r1=201024&r2=201025&view=diff
==============================================================================
--- llvm/trunk/lib/Target/PowerPC/PPCTargetObjectFile.cpp (original)
+++ llvm/trunk/lib/Target/PowerPC/PPCTargetObjectFile.cpp Sat Feb 8 08:53:28 2014
@@ -22,9 +22,9 @@ Initialize(MCContext &Ctx, const TargetM
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);
Modified: llvm/trunk/lib/Target/PowerPC/PPCTargetObjectFile.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/PowerPC/PPCTargetObjectFile.h?rev=201025&r1=201024&r2=201025&view=diff
==============================================================================
--- llvm/trunk/lib/Target/PowerPC/PPCTargetObjectFile.h (original)
+++ llvm/trunk/lib/Target/PowerPC/PPCTargetObjectFile.h Sat Feb 8 08:53:28 2014
@@ -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;
Modified: llvm/trunk/lib/Target/Sparc/SparcTargetObjectFile.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Sparc/SparcTargetObjectFile.cpp?rev=201025&r1=201024&r2=201025&view=diff
==============================================================================
--- llvm/trunk/lib/Target/Sparc/SparcTargetObjectFile.cpp (original)
+++ llvm/trunk/lib/Target/Sparc/SparcTargetObjectFile.cpp Sat Feb 8 08:53:28 2014
@@ -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());
}
Modified: llvm/trunk/lib/Target/Sparc/SparcTargetObjectFile.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Sparc/SparcTargetObjectFile.h?rev=201025&r1=201024&r2=201025&view=diff
==============================================================================
--- llvm/trunk/lib/Target/Sparc/SparcTargetObjectFile.h (original)
+++ llvm/trunk/lib/Target/Sparc/SparcTargetObjectFile.h Sat Feb 8 08:53:28 2014
@@ -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
Modified: llvm/trunk/lib/Target/TargetLoweringObjectFile.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/TargetLoweringObjectFile.cpp?rev=201025&r1=201024&r2=201025&view=diff
==============================================================================
--- llvm/trunk/lib/Target/TargetLoweringObjectFile.cpp (original)
+++ llvm/trunk/lib/Target/TargetLoweringObjectFile.cpp Sat Feb 8 08:53:28 2014
@@ -120,9 +120,9 @@ MCSymbol *TargetLoweringObjectFile::getS
}
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::ge
/// 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,
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::getSectionForC
/// 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);
}
Modified: llvm/trunk/lib/Target/X86/X86TargetObjectFile.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86TargetObjectFile.cpp?rev=201025&r1=201024&r2=201025&view=diff
==============================================================================
--- llvm/trunk/lib/Target/X86/X86TargetObjectFile.cpp (original)
+++ llvm/trunk/lib/Target/X86/X86TargetObjectFile.cpp Sat Feb 8 08:53:28 2014
@@ -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 at 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 GlobalValu
}
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::getDebugThread
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::getExecutabl
return 0;
return MCSymbolRefExpr::Create(
- getSymbol(*Mang, GVLHS), MCSymbolRefExpr::VK_COFF_IMGREL32, getContext());
+ getSymbol(Mang, GVLHS), MCSymbolRefExpr::VK_COFF_IMGREL32, getContext());
}
Modified: llvm/trunk/lib/Target/X86/X86TargetObjectFile.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86TargetObjectFile.h?rev=201025&r1=201024&r2=201025&view=diff
==============================================================================
--- llvm/trunk/lib/Target/X86/X86TargetObjectFile.h (original)
+++ llvm/trunk/lib/Target/X86/X86TargetObjectFile.h Sat Feb 8 08:53:28 2014
@@ -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;
};
Modified: llvm/trunk/lib/Target/XCore/XCoreAsmPrinter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/XCore/XCoreAsmPrinter.cpp?rev=201025&r1=201024&r2=201025&view=diff
==============================================================================
--- llvm/trunk/lib/Target/XCore/XCoreAsmPrinter.cpp (original)
+++ llvm/trunk/lib/Target/XCore/XCoreAsmPrinter.cpp Sat Feb 8 08:53:28 2014
@@ -113,9 +113,9 @@ void XCoreAsmPrinter::EmitGlobalVariable
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());
Modified: llvm/trunk/lib/Target/XCore/XCoreTargetObjectFile.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/XCore/XCoreTargetObjectFile.cpp?rev=201025&r1=201024&r2=201025&view=diff
==============================================================================
--- llvm/trunk/lib/Target/XCore/XCoreTargetObjectFile.cpp (original)
+++ llvm/trunk/lib/Target/XCore/XCoreTargetObjectFile.cpp Sat Feb 8 08:53:28 2014
@@ -120,7 +120,7 @@ static unsigned getXCoreSectionFlags(Sec
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 GlobalVal
}
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;
Modified: llvm/trunk/lib/Target/XCore/XCoreTargetObjectFile.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/XCore/XCoreTargetObjectFile.h?rev=201025&r1=201024&r2=201025&view=diff
==============================================================================
--- llvm/trunk/lib/Target/XCore/XCoreTargetObjectFile.h (original)
+++ llvm/trunk/lib/Target/XCore/XCoreTargetObjectFile.h Sat Feb 8 08:53:28 2014
@@ -24,12 +24,12 @@ static const unsigned CodeModelLargeSize
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;
More information about the llvm-commits
mailing list