mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-24 03:33:20 +01:00
Modernize old-style static asserts. NFC.
llvm-svn: 219588
This commit is contained in:
parent
a033fe29e0
commit
6b288538ef
@ -2737,7 +2737,7 @@ SDValue SelectionDAG::getNode(unsigned Opcode, SDLoc DL,
|
||||
case ISD::FP_TO_UINT: {
|
||||
integerPart x[2];
|
||||
bool ignored;
|
||||
assert(integerPartWidth >= 64);
|
||||
static_assert(integerPartWidth >= 64, "APFloat parts too small!");
|
||||
// FIXME need to be more flexible about rounding mode.
|
||||
APFloat::opStatus s = V.convertToInteger(x, VT.getSizeInBits(),
|
||||
Opcode==ISD::FP_TO_SINT,
|
||||
|
@ -35,8 +35,7 @@ using namespace llvm;
|
||||
|
||||
/* Assumed in hexadecimal significand parsing, and conversion to
|
||||
hexadecimal strings. */
|
||||
#define COMPILE_TIME_ASSERT(cond) extern int CTAssert[(cond) ? 1 : -1]
|
||||
COMPILE_TIME_ASSERT(integerPartWidth % 4 == 0);
|
||||
static_assert(integerPartWidth % 4 == 0, "Part width must be divisible by 4!");
|
||||
|
||||
namespace llvm {
|
||||
|
||||
|
@ -2288,8 +2288,7 @@ void APInt::print(raw_ostream &OS, bool isSigned) const {
|
||||
|
||||
// Assumed by lowHalf, highHalf, partMSB and partLSB. A fairly safe
|
||||
// and unrestricting assumption.
|
||||
#define COMPILE_TIME_ASSERT(cond) extern int CTAssert[(cond) ? 1 : -1]
|
||||
COMPILE_TIME_ASSERT(integerPartWidth % 2 == 0);
|
||||
static_assert(integerPartWidth % 2 == 0, "Part width must be divisible by 2!");
|
||||
|
||||
/* Some handy functions local to this file. */
|
||||
namespace {
|
||||
|
Loading…
Reference in New Issue
Block a user