aboutsummaryrefslogtreecommitdiffstats
path: root/include/llvm/Support/MathExtras.h
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2010-11-23 04:04:25 +0000
committerChris Lattner <sabre@nondot.org>2010-11-23 04:04:25 +0000
commit3afc385042fb0d121e9454347f975e4f1a5f5bfd (patch)
tree256314b5350f1634d712b97090442bcb824f8309 /include/llvm/Support/MathExtras.h
parentbf17cfa3f904e488e898ac2e3af706fd1a892f08 (diff)
downloadexternal_llvm-3afc385042fb0d121e9454347f975e4f1a5f5bfd.zip
external_llvm-3afc385042fb0d121e9454347f975e4f1a5f5bfd.tar.gz
external_llvm-3afc385042fb0d121e9454347f975e4f1a5f5bfd.tar.bz2
reimplement SwapByteOrder.h in terms of overloading instead of
being in terms of excessively complex template logic. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@119992 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/Support/MathExtras.h')
-rw-r--r--include/llvm/Support/MathExtras.h7
1 files changed, 3 insertions, 4 deletions
diff --git a/include/llvm/Support/MathExtras.h b/include/llvm/Support/MathExtras.h
index dafb479..1b58b3f 100644
--- a/include/llvm/Support/MathExtras.h
+++ b/include/llvm/Support/MathExtras.h
@@ -14,7 +14,6 @@
#ifndef LLVM_SUPPORT_MATHEXTRAS_H
#define LLVM_SUPPORT_MATHEXTRAS_H
-#include "llvm/System/DataTypes.h"
#include "llvm/System/SwapByteOrder.h"
namespace llvm {
@@ -119,19 +118,19 @@ inline bool isPowerOf2_64(uint64_t Value) {
/// ByteSwap_16 - This function returns a byte-swapped representation of the
/// 16-bit argument, Value.
inline uint16_t ByteSwap_16(uint16_t Value) {
- return sys::SwapByteOrder(Value);
+ return sys::SwapByteOrder_16(Value);
}
/// ByteSwap_32 - This function returns a byte-swapped representation of the
/// 32-bit argument, Value.
inline uint32_t ByteSwap_32(uint32_t Value) {
- return sys::SwapByteOrder(Value);
+ return sys::SwapByteOrder_32(Value);
}
/// ByteSwap_64 - This function returns a byte-swapped representation of the
/// 64-bit argument, Value.
inline uint64_t ByteSwap_64(uint64_t Value) {
- return sys::SwapByteOrder(Value);
+ return sys::SwapByteOrder_64(Value);
}
/// CountLeadingZeros_32 - this function performs the platform optimal form of