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

Bill Wendling isanbard at gmail.com
Wed Jan 16 10:50:35 PST 2008


On Jan 15, 2008 11:56 PM, Duncan Sands <duncan.sands at math.u-psud.fr> wrote:
> 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?
>
Good idea! Done.

-bw



More information about the llvm-commits mailing list