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:
Guy Benyei
2013-02-12 21:21:59 +00:00
parent 5f3c4a3910
commit 87d0b9ed14
18 changed files with 80 additions and 56 deletions

View File

@ -481,7 +481,7 @@ static void PrintSectionContents(const ObjectFile *o) {
// Print ascii.
outs() << " ";
for (std::size_t i = 0; i < 16 && addr + i < end; ++i) {
if (std::isprint(Contents[addr + i] & 0xFF))
if (std::isprint(static_cast<unsigned char>(Contents[addr + i]) & 0xFF))
outs() << Contents[addr + i];
else
outs() << ".";