Make the host endianness check an integer constant expression.
authorRafael Espindola <rafael.espindola@gmail.com>
Mon, 15 Apr 2013 14:44:24 +0000 (14:44 +0000)
committerRafael Espindola <rafael.espindola@gmail.com>
Mon, 15 Apr 2013 14:44:24 +0000 (14:44 +0000)
commit41cb64f4fa9e9976508faf56a788178bc826e64a
treeac92b1ecca7fc340c4c7439587066076e3a89ed4
parentcb45bc1861c3ebfec86fa7add7463a210839dd39
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/include/llvm/ADT/Hashing.h
llvm/include/llvm/Support/Endian.h
llvm/include/llvm/Support/Host.h
llvm/lib/ExecutionEngine/ExecutionEngine.cpp
llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldImpl.h
llvm/lib/Object/MachOObject.cpp
llvm/lib/Support/DataExtractor.cpp
llvm/lib/Support/FoldingSet.cpp