My compiler complains that "x always evaluates to true"
authorDuncan Sands <baldrick@free.fr>
Wed, 28 Nov 2007 10:36:19 +0000 (10:36 +0000)
committerDuncan Sands <baldrick@free.fr>
Wed, 28 Nov 2007 10:36:19 +0000 (10:36 +0000)
commitdd65a73af480b727de6f7ceb925c5f7ea75bdc13
treef00398a41015290102bf7016f73043d6e9a8d634
parent0a488b320c3891f427ca2e6d96b1b3fc0fcc9de8
My compiler complains that "x always evaluates to true"
in this call:

Result.IntVal = APInt(80, 2, x);

What is x?

uint16_t x[8];

I deduce that the APInt constructor being used is this one:

  APInt(uint32_t numBits, uint64_t val, bool isSigned = false);

rather than this one:

  APInt(uint32_t numBits, uint32_t numWords, const uint64_t bigVal[]);

That doesn't seem right!  This fix compiles but is otherwise completely
untested.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44400 91177308-0d34-0410-b5e6-96231b3b80d8
lib/ExecutionEngine/ExecutionEngine.cpp