From 8831db745bb0c3ed7939df475f924f53f43254a2 Mon Sep 17 00:00:00 2001 From: Misha Brukman Date: Wed, 18 Aug 2004 22:56:12 +0000 Subject: [PATCH] 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 --- include/Support/StringExtras.h | 15 +++++++-------- include/llvm/ADT/StringExtras.h | 15 +++++++-------- 2 files changed, 14 insertions(+), 16 deletions(-) diff --git a/include/Support/StringExtras.h b/include/Support/StringExtras.h index 628528d322d..fcfa65f232f 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(-X), true); - else - return utostr(static_cast(X)); -} - - static inline std::string utostr(unsigned long X, bool isNeg = false) { return utostr(static_cast(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(-X), true); + else + return utostr(static_cast(X)); +} + static inline std::string itostr(long X) { if (X < 0) return utostr(static_cast(-X), true); diff --git a/include/llvm/ADT/StringExtras.h b/include/llvm/ADT/StringExtras.h index 628528d322d..fcfa65f232f 100644 --- a/include/llvm/ADT/StringExtras.h +++ b/include/llvm/ADT/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(-X), true); - else - return utostr(static_cast(X)); -} - - static inline std::string utostr(unsigned long X, bool isNeg = false) { return utostr(static_cast(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(-X), true); + else + return utostr(static_cast(X)); +} + static inline std::string itostr(long X) { if (X < 0) return utostr(static_cast(-X), true);