From 4229b946a83aed7af1f7089ee57c88a83b174c2c Mon Sep 17 00:00:00 2001 From: Rui Ueyama Date: Thu, 2 Apr 2015 04:48:30 +0000 Subject: [PATCH] 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 --- lld/lib/ReaderWriter/ELF/Mips/MipsELFWriters.h | 5 ++--- 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 25e1f32f5acd..63803bf841c3 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 MipsRuntimeFile; template class MipsTargetLayout; template class MipsELFWriter { @@ -52,8 +51,8 @@ public: return _targetLayout.getGOTSection().hasGlobalGOTEntry(a); } - std::unique_ptr> createRuntimeFile() { - auto file = llvm::make_unique>(_ctx); + std::unique_ptr> createRuntimeFile() { + auto file = llvm::make_unique>(_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 9617284bb19e..1018e332ffe5 100644 --- a/lld/lib/ReaderWriter/ELF/Mips/MipsTargetHandler.h +++ b/lld/lib/ReaderWriter/ELF/Mips/MipsTargetHandler.h @@ -83,20 +83,13 @@ private: llvm::Optional _gpDispAtom; }; -/// \brief Mips Runtime file. -template class MipsRuntimeFile final : public RuntimeFile { -public: - MipsRuntimeFile(MipsLinkingContext &ctx) - : RuntimeFile(ctx, "Mips runtime file") {} -}; - /// \brief TargetHandler for Mips template class MipsTargetHandler final : public TargetHandler { public: MipsTargetHandler(MipsLinkingContext &ctx) - : _ctx(ctx), _runtimeFile(new MipsRuntimeFile(ctx)), - _targetLayout(new MipsTargetLayout(ctx)), - _relocationHandler(createMipsRelocationHandler(ctx, *_targetLayout)) {} + : _ctx(ctx), _targetLayout(new MipsTargetLayout(ctx)), + _relocationHandler( + createMipsRelocationHandler(ctx, *_targetLayout)) {} std::unique_ptr getObjReader() override { return llvm::make_unique>(_ctx); @@ -127,7 +120,6 @@ public: private: MipsLinkingContext &_ctx; - std::unique_ptr> _runtimeFile; std::unique_ptr> _targetLayout; std::unique_ptr _relocationHandler; };