Add support for utostr(unsigned long)
authorBrian Gaeke <gaeke@uiuc.edu>
Wed, 29 Oct 2003 20:06:19 +0000 (20:06 +0000)
committerBrian Gaeke <gaeke@uiuc.edu>
Wed, 29 Oct 2003 20:06:19 +0000 (20:06 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9588 91177308-0d34-0410-b5e6-96231b3b80d8

include/Support/StringExtras.h
include/llvm/ADT/StringExtras.h

index 0ca6609ff45b47ed07402221d18eae4c8d11c1ae..b0f5c51ed0b2a868c38b0ae06d713c7fe151c537 100644 (file)
@@ -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;
index 0ca6609ff45b47ed07402221d18eae4c8d11c1ae..b0f5c51ed0b2a868c38b0ae06d713c7fe151c537 100644 (file)
@@ -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;