diff options
author | Andrew Lenharth <andrewl@lenharth.org> | 2006-05-31 18:56:42 +0000 |
---|---|---|
committer | Andrew Lenharth <andrewl@lenharth.org> | 2006-05-31 18:56:42 +0000 |
commit | cffba3a6e934fb80008e1a18d8abef29ef137437 (patch) | |
tree | a3aa07afdfc5da1b956e77f418021b2635f3b3ec /include/llvm | |
parent | 4c6f2f9e92eae3e676ee09133e9666567782faa3 (diff) | |
download | external_llvm-cffba3a6e934fb80008e1a18d8abef29ef137437.zip external_llvm-cffba3a6e934fb80008e1a18d8abef29ef137437.tar.gz external_llvm-cffba3a6e934fb80008e1a18d8abef29ef137437.tar.bz2 |
make 64-bit safe and fix the build on alpha
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28593 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm')
-rw-r--r-- | include/llvm/ADT/StringExtras.h | 15 |
1 files changed, 2 insertions, 13 deletions
diff --git a/include/llvm/ADT/StringExtras.h b/include/llvm/ADT/StringExtras.h index 375b655..e66fc69 100644 --- a/include/llvm/ADT/StringExtras.h +++ b/include/llvm/ADT/StringExtras.h @@ -55,11 +55,7 @@ static inline std::string utostr(uint64_t X, bool isNeg = false) { return std::string(BufPtr); } -static inline std::string utostr(unsigned long X, bool isNeg = false) { - return utostr(static_cast<uint64_t>(X), isNeg); -} - -static inline std::string utostr(unsigned X, bool isNeg = false) { +static inline std::string utostr(uint32_t X, bool isNeg = false) { char Buffer[20]; char *BufPtr = Buffer+19; @@ -83,14 +79,7 @@ static inline std::string itostr(int64_t X) { return utostr(static_cast<uint64_t>(X)); } -static inline std::string itostr(long X) { - if (X < 0) - return utostr(static_cast<uint64_t>(-X), true); - else - return utostr(static_cast<uint64_t>(X)); -} - -static inline std::string itostr(int X) { +static inline std::string itostr(int32_t X) { if (X < 0) return utostr(static_cast<unsigned>(-X), true); else |