summaryrefslogtreecommitdiff
path: root/lib/IR/LLVMContext.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/IR/LLVMContext.cpp')
-rw-r--r--lib/IR/LLVMContext.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/IR/LLVMContext.cpp b/lib/IR/LLVMContext.cpp
index 8e2bbb79ee..b73cd03ddd 100644
--- a/lib/IR/LLVMContext.cpp
+++ b/lib/IR/LLVMContext.cpp
@@ -130,12 +130,13 @@ static bool isValidName(StringRef MDName) {
if (MDName.empty())
return false;
- if (!std::isalpha(MDName[0]))
+ if (!std::isalpha(static_cast<unsigned char>(MDName[0])))
return false;
for (StringRef::iterator I = MDName.begin() + 1, E = MDName.end(); I != E;
++I) {
- if (!std::isalnum(*I) && *I != '_' && *I != '-' && *I != '.')
+ if (!std::isalnum(static_cast<unsigned char>(*I)) && *I != '_' &&
+ *I != '-' && *I != '.')
return false;
}
return true;