diff options
author | Rafael Espindola <rafael.espindola@gmail.com> | 2014-02-08 14:53:28 +0000 |
---|---|---|
committer | Rafael Espindola <rafael.espindola@gmail.com> | 2014-02-08 14:53:28 +0000 |
commit | fa0f72837f98fd13fb2dfee1712be4a8b13b0260 (patch) | |
tree | e273826acddef8931f15d8a32df7d5c264b8e246 /llvm/lib/Target/XCore | |
parent | bfc57f8370ea39e936b9bb41456fd8d60c0f3108 (diff) | |
download | bcm5719-llvm-fa0f72837f98fd13fb2dfee1712be4a8b13b0260.tar.gz bcm5719-llvm-fa0f72837f98fd13fb2dfee1712be4a8b13b0260.zip |
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.
llvm-svn: 201025
Diffstat (limited to 'llvm/lib/Target/XCore')
-rw-r--r-- | llvm/lib/Target/XCore/XCoreAsmPrinter.cpp | 4 | ||||
-rw-r--r-- | llvm/lib/Target/XCore/XCoreTargetObjectFile.cpp | 4 | ||||
-rw-r--r-- | llvm/lib/Target/XCore/XCoreTargetObjectFile.h | 4 |
3 files changed, 6 insertions, 6 deletions
diff --git a/llvm/lib/Target/XCore/XCoreAsmPrinter.cpp b/llvm/lib/Target/XCore/XCoreAsmPrinter.cpp index fe030fa4c23..1edd33c5f02 100644 --- a/llvm/lib/Target/XCore/XCoreAsmPrinter.cpp +++ b/llvm/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/llvm/lib/Target/XCore/XCoreTargetObjectFile.cpp b/llvm/lib/Target/XCore/XCoreTargetObjectFile.cpp index 61eb2b51f3e..cf565e7a1e7 100644 --- a/llvm/lib/Target/XCore/XCoreTargetObjectFile.cpp +++ b/llvm/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/llvm/lib/Target/XCore/XCoreTargetObjectFile.h b/llvm/lib/Target/XCore/XCoreTargetObjectFile.h index fee84256b88..47d7fad8eea 100644 --- a/llvm/lib/Target/XCore/XCoreTargetObjectFile.h +++ b/llvm/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; |