[llvm-commits] [llvm-gcc-4.2] r46039 - /llvm-gcc-4.2/trunk/gcc/llvm-convert.cpp

Duncan Sands duncan.sands at math.u-psud.fr
Tue Jan 15 23:56:43 PST 2008


Hi Bill,

> +    // Determine endianness of host machine.
> +    union {
> +      int x;
> +      char y[sizeof(int)];
> +    } u;
> +    u.x = 1;
> +    bool BigEndian = (u.y[0] != 1);

how about using bigEndianHost in System/Host.h instead?

Ciao,

Duncan.



More information about the llvm-commits mailing list