diff options
Diffstat (limited to 'llvm/tools/llvm-objcopy/ELF/Object.cpp')
-rw-r--r-- | llvm/tools/llvm-objcopy/ELF/Object.cpp | 26 |
1 files changed, 14 insertions, 12 deletions
diff --git a/llvm/tools/llvm-objcopy/ELF/Object.cpp b/llvm/tools/llvm-objcopy/ELF/Object.cpp index 5f1b4c3..0255fda 100644 --- a/llvm/tools/llvm-objcopy/ELF/Object.cpp +++ b/llvm/tools/llvm-objcopy/ELF/Object.cpp @@ -29,12 +29,10 @@ #include <utility> #include <vector> -namespace llvm { -namespace objcopy { -namespace elf { - -using namespace object; -using namespace ELF; +using namespace llvm; +using namespace llvm::ELF; +using namespace llvm::objcopy::elf; +using namespace llvm::object; template <class ELFT> void ELFWriter<ELFT>::writePhdr(const Segment &Seg) { uint8_t *B = reinterpret_cast<uint8_t *>(Buf->getBufferStart()) + @@ -192,7 +190,7 @@ template <class T> static T checkedGetHex(StringRef S) { // Fills exactly Len bytes of buffer with hexadecimal characters // representing value 'X' template <class T, class Iterator> -static Iterator utohexstr(T X, Iterator It, size_t Len) { +static Iterator toHexStr(T X, Iterator It, size_t Len) { // Fill range with '0' std::fill(It, It + Len, '0'); @@ -221,13 +219,13 @@ IHexLineData IHexRecord::getLine(uint8_t Type, uint16_t Addr, assert(Line.size()); auto Iter = Line.begin(); *Iter++ = ':'; - Iter = utohexstr(Data.size(), Iter, 2); - Iter = utohexstr(Addr, Iter, 4); - Iter = utohexstr(Type, Iter, 2); + Iter = toHexStr(Data.size(), Iter, 2); + Iter = toHexStr(Addr, Iter, 4); + Iter = toHexStr(Type, Iter, 2); for (uint8_t X : Data) - Iter = utohexstr(X, Iter, 2); + Iter = toHexStr(X, Iter, 2); StringRef S(Line.data() + 1, std::distance(Line.begin() + 1, Iter)); - Iter = utohexstr(getChecksum(S), Iter, 2); + Iter = toHexStr(getChecksum(S), Iter, 2); *Iter++ = '\r'; *Iter++ = '\n'; assert(Iter == Line.end()); @@ -2706,6 +2704,10 @@ Error IHexWriter::finalize() { return Error::success(); } +namespace llvm { +namespace objcopy { +namespace elf { + template class ELFBuilder<ELF64LE>; template class ELFBuilder<ELF64BE>; template class ELFBuilder<ELF32LE>; |