diff options
| author | Shankar Easwaran <shankare@codeaurora.org> | 2014-01-27 01:02:03 +0000 |
|---|---|---|
| committer | Shankar Easwaran <shankare@codeaurora.org> | 2014-01-27 01:02:03 +0000 |
| commit | e7b831ad354c74ef9fb12b8501e4c5de676a2bc6 (patch) | |
| tree | dd5307b45131ff4c4f907f7ec3417f80208e6ee6 /lld/lib/ReaderWriter/ELF/ELFReader.h | |
| parent | 51577b66ce478fafc3cbd7614255742ceff65237 (diff) | |
| download | bcm5719-llvm-e7b831ad354c74ef9fb12b8501e4c5de676a2bc6.tar.gz bcm5719-llvm-e7b831ad354c74ef9fb12b8501e4c5de676a2bc6.zip | |
[ELF] Add Target specific Readers.
No change in functionality.
llvm-svn: 200175
Diffstat (limited to 'lld/lib/ReaderWriter/ELF/ELFReader.h')
| -rw-r--r-- | lld/lib/ReaderWriter/ELF/ELFReader.h | 15 |
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; }; |

