[lld] r210975 - Left two files out of the previous commit
Artyom Skrobov
Artyom.Skrobov at arm.com
Sat Jun 14 05:40:05 PDT 2014
Author: askrobov
Date: Sat Jun 14 07:40:04 2014
New Revision: 210975
URL: http://llvm.org/viewvc/llvm-project?rev=210975&view=rev
Log:
Left two files out of the previous commit
Modified:
lld/trunk/lib/ReaderWriter/MachO/MachONormalizedFileBinaryReader.cpp
lld/trunk/lib/ReaderWriter/MachO/MachONormalizedFileBinaryWriter.cpp
Modified: lld/trunk/lib/ReaderWriter/MachO/MachONormalizedFileBinaryReader.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/lib/ReaderWriter/MachO/MachONormalizedFileBinaryReader.cpp?rev=210975&r1=210974&r2=210975&view=diff
==============================================================================
--- lld/trunk/lib/ReaderWriter/MachO/MachONormalizedFileBinaryReader.cpp (original)
+++ lld/trunk/lib/ReaderWriter/MachO/MachONormalizedFileBinaryReader.cpp Sat Jun 14 07:40:04 2014
@@ -107,7 +107,7 @@ appendIndirectSymbols(IndirectSymbols &i
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>
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>
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));
Modified: lld/trunk/lib/ReaderWriter/MachO/MachONormalizedFileBinaryWriter.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/lib/ReaderWriter/MachO/MachONormalizedFileBinaryWriter.cpp?rev=210975&r1=210974&r2=210975&view=diff
==============================================================================
--- lld/trunk/lib/ReaderWriter/MachO/MachONormalizedFileBinaryWriter.cpp (original)
+++ lld/trunk/lib/ReaderWriter/MachO/MachONormalizedFileBinaryWriter.cpp Sat Jun 14 07:40:04 2014
@@ -787,7 +787,7 @@ void MachOFileLayout::writeSymbolTable()
for (const Section §ion : _file.sections) {
for (uint32_t index : section.indirectSymbols) {
if (_swap)
- *indirects++ = SwapByteOrder(index);
+ *indirects++ = llvm::sys::getSwappedBytes(index);
else
*indirects++ = index;
}
@@ -799,7 +799,7 @@ void MachOFileLayout::writeSymbolTable()
for (const Section *section : segInfo.sections) {
for (uint32_t index : section->indirectSymbols) {
if (_swap)
- *indirects++ = SwapByteOrder(index);
+ *indirects++ = llvm::sys::getSwappedBytes(index);
else
*indirects++ = index;
}
More information about the llvm-commits
mailing list