From: Brian Gaeke Date: Wed, 29 Oct 2003 20:06:19 +0000 (+0000) Subject: Add support for utostr(unsigned long) X-Git-Url: http://plrg.eecs.uci.edu/git/?a=commitdiff_plain;h=78e1dcc32124e123f41ca60c88d796244cf2c174;p=oota-llvm.git Add support for utostr(unsigned long) git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9588 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/include/Support/StringExtras.h b/include/Support/StringExtras.h index 0ca6609ff45..b0f5c51ed0b 100644 --- a/include/Support/StringExtras.h +++ b/include/Support/StringExtras.h @@ -61,6 +61,10 @@ static inline std::string itostr(int64_t X) { } +static inline std::string utostr(unsigned long X, bool isNeg = false) { + return utostr((unsigned long long)X, isNeg); +} + static inline std::string utostr(unsigned X, bool isNeg = false) { char Buffer[20]; char *BufPtr = Buffer+19; diff --git a/include/llvm/ADT/StringExtras.h b/include/llvm/ADT/StringExtras.h index 0ca6609ff45..b0f5c51ed0b 100644 --- a/include/llvm/ADT/StringExtras.h +++ b/include/llvm/ADT/StringExtras.h @@ -61,6 +61,10 @@ static inline std::string itostr(int64_t X) { } +static inline std::string utostr(unsigned long X, bool isNeg = false) { + return utostr((unsigned long long)X, isNeg); +} + static inline std::string utostr(unsigned X, bool isNeg = false) { char Buffer[20]; char *BufPtr = Buffer+19;