aboutsummaryrefslogtreecommitdiff
path: root/lib/Object/MachOObject.cpp
diff options
context:
space:
mode:
authorRafael Espindola <rafael.espindola@gmail.com>2013-04-15 14:44:24 +0000
committerRafael Espindola <rafael.espindola@gmail.com>2013-04-15 14:44:24 +0000
commit21a01d1ea89dba97c4f9e1f9f41485729a4046bc (patch)
tree74856a1ba8c29ceff5341282b373a58bdb2cc4d5 /lib/Object/MachOObject.cpp
parent604b3573f955d61ba87215c25ba2f52477c71ecc (diff)
Make the host endianness check an integer constant expression.
I will remove the isBigEndianHost function once I update clang. The ifdef logic is designed to * not use configure/cmake to avoid breaking -arch i686 -arch ppc. * default to little endian * be as small as possible It looks like sys/endian.h is the preferred header on most modern BSD systems, but it is better to change this in a followup patch as machine/endian.h is available on FreeBSD, OpenBSD, NetBSD and OS X. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179527 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Object/MachOObject.cpp')
-rw-r--r--lib/Object/MachOObject.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Object/MachOObject.cpp b/lib/Object/MachOObject.cpp
index c9c341a207..d88f96f298 100644
--- a/lib/Object/MachOObject.cpp
+++ b/lib/Object/MachOObject.cpp
@@ -61,7 +61,7 @@ static void ReadInMemoryStruct(const MachOObject &MOO,
MachOObject::MachOObject(MemoryBuffer *Buffer_, bool IsLittleEndian_,
bool Is64Bit_)
: Buffer(Buffer_), IsLittleEndian(IsLittleEndian_), Is64Bit(Is64Bit_),
- IsSwappedEndian(IsLittleEndian != sys::isLittleEndianHost()),
+ IsSwappedEndian(IsLittleEndian != sys::IsLittleEndianHost),
HasStringTable(false), LoadCommands(0), NumLoadedCommands(0) {
// Load the common header.
memcpy(&Header, Buffer->getBuffer().data(), sizeof(Header));