Index: lib/ReaderWriter/ELF/Mips/MipsELFWriters.h =================================================================== --- lib/ReaderWriter/ELF/Mips/MipsELFWriters.h +++ 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 @@ 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"); Index: lib/ReaderWriter/ELF/Mips/MipsTargetHandler.h =================================================================== --- lib/ReaderWriter/ELF/Mips/MipsTargetHandler.h +++ lib/ReaderWriter/ELF/Mips/MipsTargetHandler.h @@ -83,13 +83,6 @@ llvm::Optional _gpDispAtom; }; -/// \brief Mips Runtime file. -template class MipsRuntimeFile final : public RuntimeFile { -public: - MipsRuntimeFile(MipsLinkingContext &ctx) - : RuntimeFile(ctx, "Mips runtime file") {} -}; - /// \brief Auxiliary class holds relocation's names table. class MipsRelocationStringTable { static const Registry::KindStrings kindStrings[]; @@ -102,9 +95,9 @@ 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); @@ -139,7 +132,6 @@ private: MipsLinkingContext &_ctx; - std::unique_ptr> _runtimeFile; std::unique_ptr> _targetLayout; std::unique_ptr _relocationHandler; };