forked from OSchip/llvm-project
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
This commit is contained in:
parent
4ff3ed5960
commit
4229b946a8
|
@ -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");
|
||||
|
|
|
@ -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;
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue