diff options
| author | Dimitry Andric <dim@FreeBSD.org> | 2015-05-27 18:44:32 +0000 | 
|---|---|---|
| committer | Dimitry Andric <dim@FreeBSD.org> | 2015-05-27 18:44:32 +0000 | 
| commit | 5a5ac124e1efaf208671f01c46edb15f29ed2a0b (patch) | |
| tree | a6140557876943cdd800ee997c9317283394b22c /lib/Support/APFloat.cpp | |
| parent | f03b5bed27d0d2eafd68562ce14f8b5e3f1f0801 (diff) | |
Notes
Diffstat (limited to 'lib/Support/APFloat.cpp')
| -rw-r--r-- | lib/Support/APFloat.cpp | 10 | 
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/Support/APFloat.cpp b/lib/Support/APFloat.cpp index 393ecf4784cb4..4b0a0e5d4819a 100644 --- a/lib/Support/APFloat.cpp +++ b/lib/Support/APFloat.cpp @@ -1248,10 +1248,10 @@ APFloat::roundAwayFromZero(roundingMode rounding_mode,      return false;    case rmTowardPositive: -    return sign == false; +    return !sign;    case rmTowardNegative: -    return sign == true; +    return sign;    }    llvm_unreachable("Invalid rounding mode found");  } @@ -1430,7 +1430,7 @@ APFloat::addOrSubtractSignificand(const APFloat &rhs, bool subtract)    /* Determine if the operation on the absolute values is effectively       an addition or subtraction.  */ -  subtract ^= (sign ^ rhs.sign) ? true : false; +  subtract ^= static_cast<bool>(sign ^ rhs.sign);    /* Are we bigger exponent-wise than the RHS?  */    bits = exponent - rhs.exponent; @@ -3920,7 +3920,7 @@ APFloat::makeZero(bool Negative) {  APFloat llvm::scalbn(APFloat X, int Exp) {    if (X.isInfinity() || X.isZero() || X.isNaN()) -    return std::move(X); +    return X;    auto MaxExp = X.getSemantics().maxExponent;    auto MinExp = X.getSemantics().minExponent; @@ -3932,5 +3932,5 @@ APFloat llvm::scalbn(APFloat X, int Exp) {      return APFloat::getZero(X.getSemantics(), X.isNegative());    X.exponent += Exp; -  return std::move(X); +  return X;  }  | 
