summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Support
diff options
context:
space:
mode:
authorSimon Pilgrim <llvm-dev@redking.me.uk>2017-02-23 16:07:04 +0000
committerSimon Pilgrim <llvm-dev@redking.me.uk>2017-02-23 16:07:04 +0000
commit4c0ea9d43812c9dd0a7cb703cfc346d6b03ce542 (patch)
tree4c50a5902dbb4636f6b37d3bba120964a4adc6cf /llvm/lib/Support
parentc38cd69256e1bd35dc98778905b5a369233bef71 (diff)
downloadbcm5719-llvm-4c0ea9d43812c9dd0a7cb703cfc346d6b03ce542.tar.gz
bcm5719-llvm-4c0ea9d43812c9dd0a7cb703cfc346d6b03ce542.zip
Strip trailing whitespace.
llvm-svn: 295989
Diffstat (limited to 'llvm/lib/Support')
-rw-r--r--llvm/lib/Support/APInt.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/llvm/lib/Support/APInt.cpp b/llvm/lib/Support/APInt.cpp
index 7e17e42dc91..35c15e04bf0 100644
--- a/llvm/lib/Support/APInt.cpp
+++ b/llvm/lib/Support/APInt.cpp
@@ -63,7 +63,7 @@ inline static unsigned getDigit(char cdigit, uint8_t radix) {
r = cdigit - 'a';
if (r <= radix - 11U)
return r + 10;
-
+
radix = 10;
}
@@ -587,7 +587,7 @@ void APInt::flipBit(unsigned bitPosition) {
unsigned APInt::getBitsNeeded(StringRef str, uint8_t radix) {
assert(!str.empty() && "Invalid string length");
- assert((radix == 10 || radix == 8 || radix == 16 || radix == 2 ||
+ assert((radix == 10 || radix == 8 || radix == 16 || radix == 2 ||
radix == 36) &&
"Radix should be 2, 8, 10, 16, or 36!");
@@ -612,7 +612,7 @@ unsigned APInt::getBitsNeeded(StringRef str, uint8_t radix) {
return slen * 4 + isNegative;
// FIXME: base 36
-
+
// This is grossly inefficient but accurate. We could probably do something
// with a computation of roughly slen*64/20 and then adjust by the value of
// the first few digits. But, I'm not sure how accurate that could be.
@@ -621,7 +621,7 @@ unsigned APInt::getBitsNeeded(StringRef str, uint8_t radix) {
// be too large. This avoids the assertion in the constructor. This
// calculation doesn't work appropriately for the numbers 0-9, so just use 4
// bits in that case.
- unsigned sufficient
+ unsigned sufficient
= radix == 10? (slen == 1 ? 4 : slen * 64/18)
: (slen == 1 ? 7 : slen * 16/3);
@@ -2035,7 +2035,7 @@ APInt APInt::sdiv_ov(const APInt &RHS, bool &Overflow) const {
APInt APInt::smul_ov(const APInt &RHS, bool &Overflow) const {
APInt Res = *this * RHS;
-
+
if (*this != 0 && RHS != 0)
Overflow = Res.sdiv(RHS) != *this || Res.sdiv(*this) != RHS;
else
@@ -2062,7 +2062,7 @@ APInt APInt::sshl_ov(const APInt &ShAmt, bool &Overflow) const {
Overflow = ShAmt.uge(countLeadingZeros());
else
Overflow = ShAmt.uge(countLeadingOnes());
-
+
return *this << ShAmt;
}
@@ -2082,7 +2082,7 @@ APInt APInt::ushl_ov(const APInt &ShAmt, bool &Overflow) const {
void APInt::fromString(unsigned numbits, StringRef str, uint8_t radix) {
// Check our assumptions here
assert(!str.empty() && "Invalid string length");
- assert((radix == 10 || radix == 8 || radix == 16 || radix == 2 ||
+ assert((radix == 10 || radix == 8 || radix == 16 || radix == 2 ||
radix == 36) &&
"Radix should be 2, 8, 10, 16, or 36!");
@@ -2141,7 +2141,7 @@ void APInt::fromString(unsigned numbits, StringRef str, uint8_t radix) {
void APInt::toString(SmallVectorImpl<char> &Str, unsigned Radix,
bool Signed, bool formatAsCLiteral) const {
- assert((Radix == 10 || Radix == 8 || Radix == 16 || Radix == 2 ||
+ assert((Radix == 10 || Radix == 8 || Radix == 16 || Radix == 2 ||
Radix == 36) &&
"Radix should be 2, 8, 10, 16, or 36!");
OpenPOWER on IntegriCloud