diff options
author | Artyom Skrobov <Artyom.Skrobov@arm.com> | 2014-06-14 11:36:01 +0000 |
---|---|---|
committer | Artyom Skrobov <Artyom.Skrobov@arm.com> | 2014-06-14 11:36:01 +0000 |
commit | 9bb92cb53742195f318dc230e5e306b5bbb9f9d6 (patch) | |
tree | 8941f719496fc876687d7076528a7bd86854e6ae /lib | |
parent | 7a3a02047874c4440e847b78982edf8e1bafb397 (diff) | |
download | llvm-9bb92cb53742195f318dc230e5e306b5bbb9f9d6.tar.gz llvm-9bb92cb53742195f318dc230e5e306b5bbb9f9d6.tar.bz2 llvm-9bb92cb53742195f318dc230e5e306b5bbb9f9d6.tar.xz |
Renaming SwapByteOrder() to getSwappedBytes()
The next commit will add swapByteOrder(), acting in-place
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@210973 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r-- | lib/ExecutionEngine/RuntimeDyld/RuntimeDyldImpl.h | 6 | ||||
-rw-r--r-- | lib/MC/ELFObjectWriter.cpp | 2 | ||||
-rw-r--r-- | lib/Object/MachOObjectFile.cpp | 2 | ||||
-rw-r--r-- | lib/Object/MachOUniversal.cpp | 2 | ||||
-rw-r--r-- | lib/ProfileData/InstrProfReader.cpp | 2 | ||||
-rw-r--r-- | lib/Support/DataExtractor.cpp | 2 |
6 files changed, 8 insertions, 8 deletions
diff --git a/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldImpl.h b/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldImpl.h index 4c7f0b52c7..3e9a68a2a3 100644 --- a/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldImpl.h +++ b/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldImpl.h @@ -245,14 +245,14 @@ protected: void writeInt16BE(uint8_t *Addr, uint16_t Value) { if (IsTargetLittleEndian) - Value = sys::SwapByteOrder(Value); + Value = sys::getSwappedBytes(Value); *Addr = (Value >> 8) & 0xFF; *(Addr + 1) = Value & 0xFF; } void writeInt32BE(uint8_t *Addr, uint32_t Value) { if (IsTargetLittleEndian) - Value = sys::SwapByteOrder(Value); + Value = sys::getSwappedBytes(Value); *Addr = (Value >> 24) & 0xFF; *(Addr + 1) = (Value >> 16) & 0xFF; *(Addr + 2) = (Value >> 8) & 0xFF; @@ -261,7 +261,7 @@ protected: void writeInt64BE(uint8_t *Addr, uint64_t Value) { if (IsTargetLittleEndian) - Value = sys::SwapByteOrder(Value); + Value = sys::getSwappedBytes(Value); *Addr = (Value >> 56) & 0xFF; *(Addr + 1) = (Value >> 48) & 0xFF; *(Addr + 2) = (Value >> 40) & 0xFF; diff --git a/lib/MC/ELFObjectWriter.cpp b/lib/MC/ELFObjectWriter.cpp index 0a54627f8c..0a17c33f7f 100644 --- a/lib/MC/ELFObjectWriter.cpp +++ b/lib/MC/ELFObjectWriter.cpp @@ -1179,7 +1179,7 @@ prependCompressionHeader(uint64_t Size, if (Size <= Magic.size() + sizeof(Size) + CompressedContents.size()) return false; if (sys::IsLittleEndianHost) - Size = sys::SwapByteOrder(Size); + Size = sys::getSwappedBytes(Size); CompressedContents.insert(CompressedContents.begin(), Magic.size() + sizeof(Size), 0); std::copy(Magic.begin(), Magic.end(), CompressedContents.begin()); diff --git a/lib/Object/MachOObjectFile.cpp b/lib/Object/MachOObjectFile.cpp index e61422885b..18f5cc057a 100644 --- a/lib/Object/MachOObjectFile.cpp +++ b/lib/Object/MachOObjectFile.cpp @@ -45,7 +45,7 @@ struct section_base { template<typename T> static void SwapValue(T &Value) { - Value = sys::SwapByteOrder(Value); + Value = sys::getSwappedBytes(Value); } template<typename T> diff --git a/lib/Object/MachOUniversal.cpp b/lib/Object/MachOUniversal.cpp index ea4773feee..f34a3b452f 100644 --- a/lib/Object/MachOUniversal.cpp +++ b/lib/Object/MachOUniversal.cpp @@ -24,7 +24,7 @@ using namespace object; template<typename T> static void SwapValue(T &Value) { - Value = sys::SwapByteOrder(Value); + Value = sys::getSwappedBytes(Value); } template<typename T> diff --git a/lib/ProfileData/InstrProfReader.cpp b/lib/ProfileData/InstrProfReader.cpp index c7809b8b8c..d0493d34c2 100644 --- a/lib/ProfileData/InstrProfReader.cpp +++ b/lib/ProfileData/InstrProfReader.cpp @@ -158,7 +158,7 @@ bool RawInstrProfReader<IntPtrT>::hasFormat(const MemoryBuffer &DataBuffer) { uint64_t Magic = *reinterpret_cast<const uint64_t *>(DataBuffer.getBufferStart()); return getRawMagic<IntPtrT>() == Magic || - sys::SwapByteOrder(getRawMagic<IntPtrT>()) == Magic; + sys::getSwappedBytes(getRawMagic<IntPtrT>()) == Magic; } template <class IntPtrT> diff --git a/lib/Support/DataExtractor.cpp b/lib/Support/DataExtractor.cpp index 7b829215d2..c320554b63 100644 --- a/lib/Support/DataExtractor.cpp +++ b/lib/Support/DataExtractor.cpp @@ -21,7 +21,7 @@ static T getU(uint32_t *offset_ptr, const DataExtractor *de, if (de->isValidOffsetForDataOfSize(offset, sizeof(val))) { std::memcpy(&val, &Data[offset], sizeof(val)); if (sys::IsLittleEndianHost != isLittleEndian) - val = sys::SwapByteOrder(val); + val = sys::getSwappedBytes(val); // Advance the offset *offset_ptr += sizeof(val); |