[patch] Find if we are big endian at compile time

Rafael EspĂ­ndola rafael.espindola at gmail.com
Thu Apr 11 14:36:29 PDT 2013


I need to specialize a template on the *host* endianness and noticed
we don't have any integer constant expression with that information
available.

Most projects find this with a configure/cmake check, but that is not
a good idea since it would break building fat binaries.

I tried porting the existing check to compile time, but I could not
figure out how to do it.

The attached patches just use the compiler provided macros.

Cheers,
Rafael
-------------- next part --------------
A non-text attachment was scrubbed...
Name: llvm.patch
Type: application/octet-stream
Size: 7059 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20130411/5aca9119/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: clang.patch
Type: application/octet-stream
Size: 574 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20130411/5aca9119/attachment-0001.obj>


More information about the llvm-commits mailing list