[lld] r233888 - ELF: Mips: Remove unused field and almost-empty class.
Rui Ueyama
ruiu at google.com
Wed Apr 1 21:48:31 PDT 2015
Author: ruiu
Date: Wed Apr 1 23:48:30 2015
New Revision: 233888
URL: http://llvm.org/viewvc/llvm-project?rev=233888&view=rev
Log:
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.
Modified:
lld/trunk/lib/ReaderWriter/ELF/Mips/MipsELFWriters.h
lld/trunk/lib/ReaderWriter/ELF/Mips/MipsTargetHandler.h
Modified: lld/trunk/lib/ReaderWriter/ELF/Mips/MipsELFWriters.h
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/lib/ReaderWriter/ELF/Mips/MipsELFWriters.h?rev=233888&r1=233887&r2=233888&view=diff
==============================================================================
--- lld/trunk/lib/ReaderWriter/ELF/Mips/MipsELFWriters.h (original)
+++ lld/trunk/lib/ReaderWriter/ELF/Mips/MipsELFWriters.h Wed Apr 1 23:48:30 2015
@@ -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");
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=233888&r1=233887&r2=233888&view=diff
==============================================================================
--- lld/trunk/lib/ReaderWriter/ELF/Mips/MipsTargetHandler.h (original)
+++ lld/trunk/lib/ReaderWriter/ELF/Mips/MipsTargetHandler.h Wed Apr 1 23:48:30 2015
@@ -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;
};
More information about the llvm-commits
mailing list