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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201025 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Rafael Espindola
2014-02-08 14:53:28 +00:00
parent 3f2e9e5e79
commit e09411dd68
25 changed files with 103 additions and 101 deletions

View File

@ -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);
}