diff --git a/include/Support/StringExtras.h b/include/Support/StringExtras.h index daf866f301d..ce268caa5e1 100644 --- a/include/Support/StringExtras.h +++ b/include/Support/StringExtras.h @@ -97,11 +97,11 @@ static inline std::string ftostr(double V) { return Buffer; } -static inline std::string LowercaseString (const std::string &S) { +static inline std::string LowercaseString(const std::string &S) { std::string result (S); for (unsigned i = 0; i < S.length(); ++i) if (isupper (result[i])) - result[i] = tolower(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 daf866f301d..ce268caa5e1 100644 --- a/include/llvm/ADT/StringExtras.h +++ b/include/llvm/ADT/StringExtras.h @@ -97,11 +97,11 @@ static inline std::string ftostr(double V) { return Buffer; } -static inline std::string LowercaseString (const std::string &S) { +static inline std::string LowercaseString(const std::string &S) { std::string result (S); for (unsigned i = 0; i < S.length(); ++i) if (isupper (result[i])) - result[i] = tolower(result[i]); + result[i] = (char)tolower(result[i]); return result; }