diff options
| author | Rui Ueyama <ruiu@google.com> | 2013-06-16 17:14:58 +0000 |
|---|---|---|
| committer | Rui Ueyama <ruiu@google.com> | 2013-06-16 17:14:58 +0000 |
| commit | e96044a370851cd0dd5cadf9e537f863696a8c3a (patch) | |
| tree | 60808f9f9df4e89115d0b05b4e0f561cc91afe6a /lld/lib/ReaderWriter/ELF/Hexagon | |
| parent | a97f12e00a4069a03df2f9e1016fba912162d2ca (diff) | |
| download | bcm5719-llvm-e96044a370851cd0dd5cadf9e537f863696a8c3a.tar.gz bcm5719-llvm-e96044a370851cd0dd5cadf9e537f863696a8c3a.zip | |
[lld] Move AtomLayout from ELF to ReaderWriter so that it can be used by non-ELF writers.
Reviewers: Bigcheese
CC: llvm-commits
Differential Revision: http://llvm-reviews.chandlerc.com/D977
llvm-svn: 184061
Diffstat (limited to 'lld/lib/ReaderWriter/ELF/Hexagon')
3 files changed, 6 insertions, 6 deletions
diff --git a/lld/lib/ReaderWriter/ELF/Hexagon/HexagonRelocationHandler.cpp b/lld/lib/ReaderWriter/ELF/Hexagon/HexagonRelocationHandler.cpp index 3c5bff79b07..2ff6f2eebc3 100644 --- a/lld/lib/ReaderWriter/ELF/Hexagon/HexagonRelocationHandler.cpp +++ b/lld/lib/ReaderWriter/ELF/Hexagon/HexagonRelocationHandler.cpp @@ -214,7 +214,7 @@ int relocHexGOTREL_32(uint8_t *location, uint64_t P, uint64_t S, uint64_t A, } // end anon namespace ErrorOr<void> HexagonTargetRelocationHandler::applyRelocation( - ELFWriter &writer, llvm::FileOutputBuffer &buf, const AtomLayout &atom, + ELFWriter &writer, llvm::FileOutputBuffer &buf, const lld::AtomLayout &atom, const Reference &ref) const { uint8_t *atomContent = buf.getBufferStart() + atom._fileOffset; uint8_t *location = atomContent + ref.offsetInAtom(); diff --git a/lld/lib/ReaderWriter/ELF/Hexagon/HexagonRelocationHandler.h b/lld/lib/ReaderWriter/ELF/Hexagon/HexagonRelocationHandler.h index ad63e733b62..b4ab949ecb9 100644 --- a/lld/lib/ReaderWriter/ELF/Hexagon/HexagonRelocationHandler.h +++ b/lld/lib/ReaderWriter/ELF/Hexagon/HexagonRelocationHandler.h @@ -30,8 +30,8 @@ public: : _targetInfo(ti), _targetHandler(tH), _targetLayout(layout) {} virtual ErrorOr<void> - applyRelocation(ELFWriter &, llvm::FileOutputBuffer &, const AtomLayout &, - const Reference &) const; + applyRelocation(ELFWriter &, llvm::FileOutputBuffer &, + const lld::AtomLayout &, const Reference &) const; private: const HexagonTargetInfo &_targetInfo; const HexagonTargetHandler &_targetHandler; diff --git a/lld/lib/ReaderWriter/ELF/Hexagon/HexagonSectionChunks.h b/lld/lib/ReaderWriter/ELF/Hexagon/HexagonSectionChunks.h index 19911481c30..26f0a453585 100644 --- a/lld/lib/ReaderWriter/ELF/Hexagon/HexagonSectionChunks.h +++ b/lld/lib/ReaderWriter/ELF/Hexagon/HexagonSectionChunks.h @@ -36,11 +36,11 @@ public: /// \brief Does this section have an output segment. virtual bool hasOutputSegment() { return true; } - const AtomLayout &appendAtom(const Atom *atom) { + const lld::AtomLayout &appendAtom(const Atom *atom) { const DefinedAtom *definedAtom = cast<DefinedAtom>(atom); DefinedAtom::Alignment atomAlign = definedAtom->alignment(); uint64_t align2 = 1u << atomAlign.powerOf2; - this->_atoms.push_back(new (this->_alloc) AtomLayout(atom, 0, 0)); + this->_atoms.push_back(new (this->_alloc) lld::AtomLayout(atom, 0, 0)); // Set the section alignment to the largest alignment // std::max doesnot support uint64_t if (this->_align2 < align2) @@ -54,7 +54,7 @@ template <class HexagonELFType> void SDataSection<HexagonELFType>::doPreFlight() { // sort the atoms on the alignments they have been set std::stable_sort(this->_atoms.begin(), this->_atoms.end(), - [](const AtomLayout * A, const AtomLayout * B) { + [](const lld::AtomLayout * A, const lld::AtomLayout * B) { const DefinedAtom *definedAtomA = cast<DefinedAtom>(A->_atom); const DefinedAtom *definedAtomB = cast<DefinedAtom>(B->_atom); int64_t align2A = 1 << definedAtomA->alignment().powerOf2; |

