diff options
author | Misha Brukman <brukman+llvm@gmail.com> | 2004-08-18 22:56:12 +0000 |
---|---|---|
committer | Misha Brukman <brukman+llvm@gmail.com> | 2004-08-18 22:56:12 +0000 |
commit | 8831db745bb0c3ed7939df475f924f53f43254a2 (patch) | |
tree | 0663a74825d9b3f71ff85b5f7000181d2e2fdac4 /include/Support/StringExtras.h | |
parent | 43dfdb779bd3808caf9a4c305145b3e00252651a (diff) |
Instead of int64_t, overload itostr with `long long' parameter.
This appeases both SparcV9 and 64-bit PowerPC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15910 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/Support/StringExtras.h')
-rw-r--r-- | include/Support/StringExtras.h | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/include/Support/StringExtras.h b/include/Support/StringExtras.h index 628528d322..fcfa65f232 100644 --- a/include/Support/StringExtras.h +++ b/include/Support/StringExtras.h @@ -55,14 +55,6 @@ static inline std::string utostr(unsigned long long X, bool isNeg = false) { return std::string(BufPtr); } -static inline std::string itostr(int64_t X) { - if (X < 0) - return utostr(static_cast<uint64_t>(-X), true); - else - return utostr(static_cast<uint64_t>(X)); -} - - static inline std::string utostr(unsigned long X, bool isNeg = false) { return utostr(static_cast<unsigned long long>(X), isNeg); } @@ -84,6 +76,13 @@ static inline std::string utostr(unsigned X, bool isNeg = false) { return std::string(BufPtr); } +static inline std::string itostr(long 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(long X) { if (X < 0) return utostr(static_cast<uint64_t>(-X), true); |