[lld] r232915 - [Mips] Rename template argument ELFType => ELFT
Simon Atanasyan
simon at atanasyan.com
Sun Mar 22 08:41:17 PDT 2015
Author: atanasyan
Date: Sun Mar 22 10:41:16 2015
New Revision: 232915
URL: http://llvm.org/viewvc/llvm-project?rev=232915&view=rev
Log:
[Mips] Rename template argument ELFType => ELFT
No functional changes.
Modified:
lld/trunk/lib/ReaderWriter/ELF/Mips/MipsTargetHandler.h
Modified: lld/trunk/lib/ReaderWriter/ELF/Mips/MipsTargetHandler.h
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/lib/ReaderWriter/ELF/Mips/MipsTargetHandler.h?rev=232915&r1=232914&r2=232915&view=diff
==============================================================================
--- lld/trunk/lib/ReaderWriter/ELF/Mips/MipsTargetHandler.h (original)
+++ lld/trunk/lib/ReaderWriter/ELF/Mips/MipsTargetHandler.h Sun Mar 22 10:41:16 2015
@@ -23,27 +23,24 @@ namespace lld {
namespace elf {
/// \brief TargetLayout for Mips
-template <class ELFType>
-class MipsTargetLayout final : public TargetLayout<ELFType> {
+template <class ELFT> class MipsTargetLayout final : public TargetLayout<ELFT> {
public:
MipsTargetLayout(MipsLinkingContext &ctx)
- : TargetLayout<ELFType>(ctx),
- _gotSection(new (this->_allocator) MipsGOTSection<ELFType>(ctx)),
- _pltSection(new (this->_allocator) MipsPLTSection<ELFType>(ctx)) {}
-
- const MipsGOTSection<ELFType> &getGOTSection() const { return *_gotSection; }
- const MipsPLTSection<ELFType> &getPLTSection() const { return *_pltSection; }
-
- AtomSection<ELFType> *
- createSection(StringRef name, int32_t type,
- DefinedAtom::ContentPermissions permissions,
- Layout::SectionOrder order) override {
+ : TargetLayout<ELFT>(ctx),
+ _gotSection(new (this->_allocator) MipsGOTSection<ELFT>(ctx)),
+ _pltSection(new (this->_allocator) MipsPLTSection<ELFT>(ctx)) {}
+
+ const MipsGOTSection<ELFT> &getGOTSection() const { return *_gotSection; }
+ const MipsPLTSection<ELFT> &getPLTSection() const { return *_pltSection; }
+
+ AtomSection<ELFT> *createSection(StringRef name, int32_t type,
+ DefinedAtom::ContentPermissions permissions,
+ Layout::SectionOrder order) override {
if (type == DefinedAtom::typeGOT && name == ".got")
return _gotSection;
if (type == DefinedAtom::typeStub && name == ".plt")
return _pltSection;
- return DefaultLayout<ELFType>::createSection(name, type, permissions,
- order);
+ return DefaultLayout<ELFT>::createSection(name, type, permissions, order);
}
/// \brief GP offset relative to .got section.
@@ -71,25 +68,24 @@ public:
Layout::SectionOrder getSectionOrder(StringRef name, int32_t contentType,
int32_t contentPermissions) override {
if ((contentType == DefinedAtom::typeStub) && (name.startswith(".text")))
- return DefaultLayout<ELFType>::ORDER_TEXT;
+ return DefaultLayout<ELFT>::ORDER_TEXT;
- return DefaultLayout<ELFType>::getSectionOrder(name, contentType,
- contentPermissions);
+ return DefaultLayout<ELFT>::getSectionOrder(name, contentType,
+ contentPermissions);
}
private:
- MipsGOTSection<ELFType> *_gotSection;
- MipsPLTSection<ELFType> *_pltSection;
+ MipsGOTSection<ELFT> *_gotSection;
+ MipsPLTSection<ELFT> *_pltSection;
llvm::Optional<AtomLayout *> _gpAtom;
llvm::Optional<AtomLayout *> _gpDispAtom;
};
/// \brief Mips Runtime file.
-template <class ELFType>
-class MipsRuntimeFile final : public RuntimeFile<ELFType> {
+template <class ELFT> class MipsRuntimeFile final : public RuntimeFile<ELFT> {
public:
MipsRuntimeFile(MipsLinkingContext &ctx)
- : RuntimeFile<ELFType>(ctx, "Mips runtime file") {}
+ : RuntimeFile<ELFT>(ctx, "Mips runtime file") {}
};
/// \brief Auxiliary class holds relocation's names table.
More information about the llvm-commits
mailing list