summaryrefslogtreecommitdiffstats
path: root/lld/lib/ReaderWriter/MachO/MachONormalizedFileBinaryReader.cpp
diff options
context:
space:
mode:
authorArtyom Skrobov <Artyom.Skrobov@arm.com>2014-06-14 12:40:04 +0000
committerArtyom Skrobov <Artyom.Skrobov@arm.com>2014-06-14 12:40:04 +0000
commit17587fb0282475c259ea3af0073ef154805dc1d3 (patch)
tree7988fd41cc2f97eb04654faec58ff55bc5960677 /lld/lib/ReaderWriter/MachO/MachONormalizedFileBinaryReader.cpp
parent9b3f647bf32e93929c16db8043e6b365ed917fb0 (diff)
downloadbcm5719-llvm-17587fb0282475c259ea3af0073ef154805dc1d3.tar.gz
bcm5719-llvm-17587fb0282475c259ea3af0073ef154805dc1d3.zip
Left two files out of the previous commit
llvm-svn: 210975
Diffstat (limited to 'lld/lib/ReaderWriter/MachO/MachONormalizedFileBinaryReader.cpp')
-rw-r--r--lld/lib/ReaderWriter/MachO/MachONormalizedFileBinaryReader.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/lld/lib/ReaderWriter/MachO/MachONormalizedFileBinaryReader.cpp b/lld/lib/ReaderWriter/MachO/MachONormalizedFileBinaryReader.cpp
index 2ca3442a5fd..16d235da2f8 100644
--- a/lld/lib/ReaderWriter/MachO/MachONormalizedFileBinaryReader.cpp
+++ b/lld/lib/ReaderWriter/MachO/MachONormalizedFileBinaryReader.cpp
@@ -107,7 +107,7 @@ appendIndirectSymbols(IndirectSymbols &isyms, StringRef buffer, bool swap,
template <typename T> static T readBigEndian(T t) {
if (llvm::sys::IsLittleEndianHost)
- return SwapByteOrder(t);
+ return llvm::sys::getSwappedBytes(t);
return t;
}
@@ -223,7 +223,7 @@ readBinary(std::unique_ptr<MemoryBuffer> &mb,
if (cmd == LC_SEGMENT_64) {
const segment_command_64 *seg =
reinterpret_cast<const segment_command_64*>(lc);
- const unsigned sectionCount = (swap ? SwapByteOrder(seg->nsects)
+ const unsigned sectionCount = (swap ? llvm::sys::getSwappedBytes(seg->nsects)
: seg->nsects);
const section_64 *sects = reinterpret_cast<const section_64*>
(lc + sizeof(segment_command_64));
@@ -265,7 +265,7 @@ readBinary(std::unique_ptr<MemoryBuffer> &mb,
if (cmd == LC_SEGMENT) {
const segment_command *seg =
reinterpret_cast<const segment_command*>(lc);
- const unsigned sectionCount = (swap ? SwapByteOrder(seg->nsects)
+ const unsigned sectionCount = (swap ? llvm::sys::getSwappedBytes(seg->nsects)
: seg->nsects);
const section *sects = reinterpret_cast<const section*>
(lc + sizeof(segment_command));
OpenPOWER on IntegriCloud