summaryrefslogtreecommitdiffstats
path: root/lld/lib/ReaderWriter/ELF/ELFReader.h
diff options
context:
space:
mode:
Diffstat (limited to 'lld/lib/ReaderWriter/ELF/ELFReader.h')
-rw-r--r--lld/lib/ReaderWriter/ELF/ELFReader.h15
1 files changed, 6 insertions, 9 deletions
diff --git a/lld/lib/ReaderWriter/ELF/ELFReader.h b/lld/lib/ReaderWriter/ELF/ELFReader.h
index cdd7a54d04c..6fe2e7ac1be 100644
--- a/lld/lib/ReaderWriter/ELF/ELFReader.h
+++ b/lld/lib/ReaderWriter/ELF/ELFReader.h
@@ -34,16 +34,14 @@ struct ELFFileCreateELFTraits {
template <class ELFT>
static result_type create(std::unique_ptr<llvm::MemoryBuffer> mb,
- bool atomizeStrings, TargetHandlerBase *handler) {
- return lld::elf::ELFFile<ELFT>::create(std::move(mb), atomizeStrings,
- handler);
+ bool atomizeStrings) {
+ return lld::elf::ELFFile<ELFT>::create(std::move(mb), atomizeStrings);
}
};
class ELFObjectReader : public Reader {
public:
- ELFObjectReader(bool atomizeStrings, TargetHandlerBase *handler)
- : _atomizeStrings(atomizeStrings), _handler(handler) {}
+ ELFObjectReader(bool atomizeStrings) : _atomizeStrings(atomizeStrings) {}
virtual bool canParse(file_magic magic, StringRef,
const MemoryBuffer &) const {
@@ -57,16 +55,15 @@ public:
1ULL << llvm::countTrailingZeros(uintptr_t(mb->getBufferStart()));
auto f = createELF<ELFFileCreateELFTraits>(
llvm::object::getElfArchType(&*mb), maxAlignment, std::move(mb),
- _atomizeStrings, _handler);
+ _atomizeStrings);
if (error_code ec = f.getError())
return ec;
result.push_back(std::move(*f));
return error_code::success();
}
-private:
+protected:
bool _atomizeStrings;
- TargetHandlerBase *_handler;
};
class ELFDSOReader : public Reader {
@@ -92,7 +89,7 @@ public:
return error_code::success();
}
-private:
+protected:
bool _useUndefines;
};
OpenPOWER on IntegriCloud