mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-12 13:38:21 +00:00
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
This commit is contained in:
@ -165,9 +165,9 @@ bool MCSectionMachO::isVirtualSection() const {
|
||||
|
||||
/// StripSpaces - This removes leading and trailing spaces from the StringRef.
|
||||
static void StripSpaces(StringRef &Str) {
|
||||
while (!Str.empty() && isspace(Str[0]))
|
||||
while (!Str.empty() && isspace(static_cast<unsigned char>(Str[0])))
|
||||
Str = Str.substr(1);
|
||||
while (!Str.empty() && isspace(Str.back()))
|
||||
while (!Str.empty() && isspace(static_cast<unsigned char>(Str.back())))
|
||||
Str = Str.substr(0, Str.size()-1);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user