summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Support/APInt.cpp
diff options
context:
space:
mode:
authorCraig Topper <craig.topper@gmail.com>2017-03-28 05:32:53 +0000
committerCraig Topper <craig.topper@gmail.com>2017-03-28 05:32:53 +0000
commit76f4246face99d0a59e4a8ccd9eac0beba9b3831 (patch)
tree24813bf8eb0e61f6cab1d891242ce098e49dfd54 /llvm/lib/Support/APInt.cpp
parentb003816be73acf9c2a76b9e9bc979f805ef4f302 (diff)
downloadbcm5719-llvm-76f4246face99d0a59e4a8ccd9eac0beba9b3831.tar.gz
bcm5719-llvm-76f4246face99d0a59e4a8ccd9eac0beba9b3831.zip
[APInt] Remove an anonymous namespace around static functions. NFC
llvm-svn: 298899
Diffstat (limited to 'llvm/lib/Support/APInt.cpp')
-rw-r--r--llvm/lib/Support/APInt.cpp68
1 files changed, 33 insertions, 35 deletions
diff --git a/llvm/lib/Support/APInt.cpp b/llvm/lib/Support/APInt.cpp
index d9d59703f16..1cb39a2db01 100644
--- a/llvm/lib/Support/APInt.cpp
+++ b/llvm/lib/Support/APInt.cpp
@@ -2359,47 +2359,45 @@ void APInt::print(raw_ostream &OS, bool isSigned) const {
static_assert(integerPartWidth % 2 == 0, "Part width must be divisible by 2!");
/* Some handy functions local to this file. */
-namespace {
- /* Returns the integer part with the least significant BITS set.
- BITS cannot be zero. */
- static inline integerPart
- lowBitMask(unsigned bits)
- {
- assert(bits != 0 && bits <= integerPartWidth);
+/* Returns the integer part with the least significant BITS set.
+ BITS cannot be zero. */
+static inline integerPart
+lowBitMask(unsigned bits)
+{
+ assert(bits != 0 && bits <= integerPartWidth);
- return ~(integerPart) 0 >> (integerPartWidth - bits);
- }
+ return ~(integerPart) 0 >> (integerPartWidth - bits);
+}
- /* Returns the value of the lower half of PART. */
- static inline integerPart
- lowHalf(integerPart part)
- {
- return part & lowBitMask(integerPartWidth / 2);
- }
+/* Returns the value of the lower half of PART. */
+static inline integerPart
+lowHalf(integerPart part)
+{
+ return part & lowBitMask(integerPartWidth / 2);
+}
- /* Returns the value of the upper half of PART. */
- static inline integerPart
- highHalf(integerPart part)
- {
- return part >> (integerPartWidth / 2);
- }
+/* Returns the value of the upper half of PART. */
+static inline integerPart
+highHalf(integerPart part)
+{
+ return part >> (integerPartWidth / 2);
+}
- /* Returns the bit number of the most significant set bit of a part.
- If the input number has no bits set -1U is returned. */
- static unsigned
- partMSB(integerPart value)
- {
- return findLastSet(value, ZB_Max);
- }
+/* Returns the bit number of the most significant set bit of a part.
+ If the input number has no bits set -1U is returned. */
+static unsigned
+partMSB(integerPart value)
+{
+ return findLastSet(value, ZB_Max);
+}
- /* Returns the bit number of the least significant set bit of a
- part. If the input number has no bits set -1U is returned. */
- static unsigned
- partLSB(integerPart value)
- {
- return findFirstSet(value, ZB_Max);
- }
+/* Returns the bit number of the least significant set bit of a
+ part. If the input number has no bits set -1U is returned. */
+static unsigned
+partLSB(integerPart value)
+{
+ return findFirstSet(value, ZB_Max);
}
/* Sets the least significant part of a bignum to the input value, and
OpenPOWER on IntegriCloud