diff options
author | Simon Atanasyan <simon@atanasyan.com> | 2015-07-02 18:04:08 +0300 |
---|---|---|
committer | Simon Atanasyan <simon@atanasyan.com> | 2015-07-02 18:04:08 +0300 |
commit | b28f5042265fa63cf74eb7bf9a23fd061b596654 (patch) | |
tree | 379806f7fae611c25ee277705fca76d3a48cb738 /lld | |
parent | f144620cc19a51268199b2661e7097d9ab0448e4 (diff) |
[ELF] Remove dead code. NFC
llvm-svn: 241274
Diffstat (limited to 'lld')
-rw-r--r-- | lld/include/lld/ReaderWriter/ELFLinkingContext.h | 8 | ||||
-rw-r--r-- | lld/lib/ReaderWriter/ELF/ELFFile.cpp | 12 |
2 files changed, 0 insertions, 20 deletions
diff --git a/lld/include/lld/ReaderWriter/ELFLinkingContext.h b/lld/include/lld/ReaderWriter/ELFLinkingContext.h index 605d343f7e53..2ae59c0accb5 100644 --- a/lld/include/lld/ReaderWriter/ELFLinkingContext.h +++ b/lld/include/lld/ReaderWriter/ELFLinkingContext.h @@ -354,14 +354,6 @@ public: bool mipsPcRelEhRel() const { return _mipsPcRelEhRel; } void setMipsPcRelEhRel(bool value) { _mipsPcRelEhRel = value; } - /// Each time a reader reads a new file, this member function is called - /// with the file's ELF magics. This is supposed to "merge" all attributes - /// to generate output ELF file magic. This can also reject input files - /// if they conflict with previous input files. - virtual std::error_code mergeHeaderFlags(uint8_t fileClass, uint64_t flags) { - return std::error_code(); - } - protected: ELFLinkingContext(llvm::Triple triple, std::unique_ptr<TargetHandler> handler) : _triple(triple), _targetHandler(std::move(handler)) {} diff --git a/lld/lib/ReaderWriter/ELF/ELFFile.cpp b/lld/lib/ReaderWriter/ELF/ELFFile.cpp index 9893e7da0030..0e35e458f188 100644 --- a/lld/lib/ReaderWriter/ELF/ELFFile.cpp +++ b/lld/lib/ReaderWriter/ELF/ELFFile.cpp @@ -138,14 +138,8 @@ std::error_code ELFFile<ELFT>::createAtomizableSections() { if (std::error_code ec = sHdrOrErr.getError()) return ec; auto sHdr = *sHdrOrErr; - - auto sectionName = _objFile->getSectionName(sHdr); - if (std::error_code ec = sectionName.getError()) - return ec; - auto rai = _objFile->rela_begin(§ion); auto rae = _objFile->rela_end(§ion); - _relocationAddendReferences[sHdr] = make_range(rai, rae); totalRelocs += std::distance(rai, rae); } else if (section.sh_type == llvm::ELF::SHT_REL) { @@ -153,14 +147,8 @@ std::error_code ELFFile<ELFT>::createAtomizableSections() { if (std::error_code ec = sHdrOrErr.getError()) return ec; auto sHdr = *sHdrOrErr; - - auto sectionName = _objFile->getSectionName(sHdr); - if (std::error_code ec = sectionName.getError()) - return ec; - auto ri = _objFile->rel_begin(§ion); auto re = _objFile->rel_end(§ion); - _relocationReferences[sHdr] = make_range(ri, re); totalRelocs += std::distance(ri, re); } else { |