From 497b52f38125adb82de547abfc4c89c2b1e1f628 Mon Sep 17 00:00:00 2001 From: Misha Brukman Date: Tue, 20 Jul 2004 00:52:16 +0000 Subject: [PATCH] isupper() and tolower() are declared in git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15016 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/Support/StringExtras.h | 6 +++--- include/llvm/ADT/StringExtras.h | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/include/Support/StringExtras.h b/include/Support/StringExtras.h index ce268caa5e1..51df4f19f6c 100644 --- a/include/Support/StringExtras.h +++ b/include/Support/StringExtras.h @@ -16,6 +16,7 @@ #include "Support/DataTypes.h" #include +#include #include namespace llvm { @@ -51,7 +52,6 @@ static inline std::string utostr(unsigned long long X, bool isNeg = false) { } if (isNeg) *--BufPtr = '-'; // Add negative sign... - return std::string(BufPtr); } @@ -98,9 +98,9 @@ static inline std::string ftostr(double V) { } static inline std::string LowercaseString(const std::string &S) { - std::string result (S); + std::string result(S); for (unsigned i = 0; i < S.length(); ++i) - if (isupper (result[i])) + if (isupper(result[i])) result[i] = (char)tolower(result[i]); return result; } diff --git a/include/llvm/ADT/StringExtras.h b/include/llvm/ADT/StringExtras.h index ce268caa5e1..51df4f19f6c 100644 --- a/include/llvm/ADT/StringExtras.h +++ b/include/llvm/ADT/StringExtras.h @@ -16,6 +16,7 @@ #include "Support/DataTypes.h" #include +#include #include namespace llvm { @@ -51,7 +52,6 @@ static inline std::string utostr(unsigned long long X, bool isNeg = false) { } if (isNeg) *--BufPtr = '-'; // Add negative sign... - return std::string(BufPtr); } @@ -98,9 +98,9 @@ static inline std::string ftostr(double V) { } static inline std::string LowercaseString(const std::string &S) { - std::string result (S); + std::string result(S); for (unsigned i = 0; i < S.length(); ++i) - if (isupper (result[i])) + if (isupper(result[i])) result[i] = (char)tolower(result[i]); return result; } -- 2.34.1