diff options
author | Rui Ueyama <ruiu@google.com> | 2015-04-02 04:48:30 +0000 |
---|---|---|
committer | Rui Ueyama <ruiu@google.com> | 2015-04-02 04:48:30 +0000 |
commit | 4229b946a83aed7af1f7089ee57c88a83b174c2c (patch) | |
tree | ea55d5b59a040bbc182be0219c4e4dcb2e8bd1e0 | |
parent | 4ff3ed5960fef30264dff6860ff43868500880fb (diff) | |
download | bcm5719-llvm-4229b946a83aed7af1f7089ee57c88a83b174c2c.tar.gz bcm5719-llvm-4229b946a83aed7af1f7089ee57c88a83b174c2c.zip |
ELF: Mips: Remove unused field and almost-empty class.
Looks like MipsTargetHandler::_runtimeFile is unused.
MipsRuntimeFile doesn't seem to add values to the base class,
so I removed that class too.
llvm-svn: 233888
-rw-r--r-- | lld/lib/ReaderWriter/ELF/Mips/MipsELFWriters.h | 5 | ||||
-rw-r--r-- | lld/lib/ReaderWriter/ELF/Mips/MipsTargetHandler.h | 14 |
2 files changed, 5 insertions, 14 deletions
diff --git a/lld/lib/ReaderWriter/ELF/Mips/MipsELFWriters.h b/lld/lib/ReaderWriter/ELF/Mips/MipsELFWriters.h index 25e1f32f5ac..63803bf841c 100644 --- a/lld/lib/ReaderWriter/ELF/Mips/MipsELFWriters.h +++ b/lld/lib/ReaderWriter/ELF/Mips/MipsELFWriters.h @@ -14,7 +14,6 @@ namespace lld { namespace elf { -template <class ELFT> class MipsRuntimeFile; template <class ELFT> class MipsTargetLayout; template <typename ELFT> class MipsELFWriter { @@ -52,8 +51,8 @@ public: return _targetLayout.getGOTSection().hasGlobalGOTEntry(a); } - std::unique_ptr<MipsRuntimeFile<ELFT>> createRuntimeFile() { - auto file = llvm::make_unique<MipsRuntimeFile<ELFT>>(_ctx); + std::unique_ptr<RuntimeFile<ELFT>> createRuntimeFile() { + auto file = llvm::make_unique<RuntimeFile<ELFT>>(_ctx, "Mips runtime file"); if (_ctx.isDynamic()) { file->addAbsoluteAtom("_GLOBAL_OFFSET_TABLE_"); file->addAbsoluteAtom("_gp"); diff --git a/lld/lib/ReaderWriter/ELF/Mips/MipsTargetHandler.h b/lld/lib/ReaderWriter/ELF/Mips/MipsTargetHandler.h index 9617284bb19..1018e332ffe 100644 --- a/lld/lib/ReaderWriter/ELF/Mips/MipsTargetHandler.h +++ b/lld/lib/ReaderWriter/ELF/Mips/MipsTargetHandler.h @@ -83,20 +83,13 @@ private: llvm::Optional<AtomLayout *> _gpDispAtom; }; -/// \brief Mips Runtime file. -template <class ELFT> class MipsRuntimeFile final : public RuntimeFile<ELFT> { -public: - MipsRuntimeFile(MipsLinkingContext &ctx) - : RuntimeFile<ELFT>(ctx, "Mips runtime file") {} -}; - /// \brief TargetHandler for Mips template <class ELFT> class MipsTargetHandler final : public TargetHandler { public: MipsTargetHandler(MipsLinkingContext &ctx) - : _ctx(ctx), _runtimeFile(new MipsRuntimeFile<ELFT>(ctx)), - _targetLayout(new MipsTargetLayout<ELFT>(ctx)), - _relocationHandler(createMipsRelocationHandler<ELFT>(ctx, *_targetLayout)) {} + : _ctx(ctx), _targetLayout(new MipsTargetLayout<ELFT>(ctx)), + _relocationHandler( + createMipsRelocationHandler<ELFT>(ctx, *_targetLayout)) {} std::unique_ptr<Reader> getObjReader() override { return llvm::make_unique<MipsELFObjectReader<ELFT>>(_ctx); @@ -127,7 +120,6 @@ public: private: MipsLinkingContext &_ctx; - std::unique_ptr<MipsRuntimeFile<ELFT>> _runtimeFile; std::unique_ptr<MipsTargetLayout<ELFT>> _targetLayout; std::unique_ptr<TargetRelocationHandler> _relocationHandler; }; |