From 41cb64f4fa9e9976508faf56a788178bc826e64a Mon Sep 17 00:00:00 2001 From: Rafael Espindola Date: Mon, 15 Apr 2013 14:44:24 +0000 Subject: 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. llvm-svn: 179527 --- llvm/lib/Object/MachOObject.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'llvm/lib/Object/MachOObject.cpp') diff --git a/llvm/lib/Object/MachOObject.cpp b/llvm/lib/Object/MachOObject.cpp index c9c341a207c..d88f96f298c 100644 --- a/llvm/lib/Object/MachOObject.cpp +++ b/llvm/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)); -- cgit v1.2.3