diff options
author | Guy Benyei <guy.benyei@intel.com> | 2013-02-12 21:21:59 +0000 |
---|---|---|
committer | Guy Benyei <guy.benyei@intel.com> | 2013-02-12 21:21:59 +0000 |
commit | 87d0b9ed1462705dd9bf1cb7f67d0bf03af776c8 (patch) | |
tree | 54c1b122b1f937a363b1ce4a1e091e795d575785 /lib/IR/InlineAsm.cpp | |
parent | 5f3c4a39109479e81238ce28e91e5dcc565f068c (diff) | |
download | llvm-87d0b9ed1462705dd9bf1cb7f67d0bf03af776c8.tar.gz llvm-87d0b9ed1462705dd9bf1cb7f67d0bf03af776c8.tar.bz2 llvm-87d0b9ed1462705dd9bf1cb7f67d0bf03af776c8.tar.xz |
Add static cast to unsigned char whenever a character classification function is called with a signed char argument, in order to avoid assertions in Windows Debug configuration.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175006 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/IR/InlineAsm.cpp')
-rw-r--r-- | lib/IR/InlineAsm.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/IR/InlineAsm.cpp b/lib/IR/InlineAsm.cpp index 10d281bca8..9f2a9fea4b 100644 --- a/lib/IR/InlineAsm.cpp +++ b/lib/IR/InlineAsm.cpp @@ -151,10 +151,10 @@ bool InlineAsm::ConstraintInfo::Parse(StringRef Str, if (ConstraintEnd == E) return true; // "{foo" pCodes->push_back(std::string(I, ConstraintEnd+1)); I = ConstraintEnd+1; - } else if (isdigit(*I)) { // Matching Constraint + } else if (isdigit(static_cast<unsigned char>(*I))) { // Matching Constraint // Maximal munch numbers. StringRef::iterator NumStart = I; - while (I != E && isdigit(*I)) + while (I != E && isdigit(static_cast<unsigned char>(*I))) ++I; pCodes->push_back(std::string(NumStart, I)); unsigned N = atoi(pCodes->back().c_str()); |