[LLVMdev] Minor AsmPrinter bug fix

Chris Lattner clattner at apple.com
Thu Jan 22 15:39:30 PST 2009


On Jan 22, 2009, at 3:30 PM, Burke, Max wrote:

> The Microsoft CRT's implementation of isprint() has an internal assert
> that the unsigned value passed in is in [0,256) but unprintable chars
> passed in are sign extended to values that falsely trigger this  
> assert.
>
> --- c:\usr\src\llvm-svn\lib\CodeGen\AsmPrinter\AsmPrinter.cpp  Tue Jan
> 20 10:30:42 2009
> +++ c:\usr\src\llvm-integrate\lib\CodeGen\AsmPrinter\AsmPrinter.cpp
> Thu Jan 22 15:19:47 2009
>
> @@ -681,7 +681,7 @@
>     O << "\\\"";
>   } else if (C == '\\') {
>     O << "\\\\";
> -  } else if (isprint(C)) {
> +  } else if (isprint((unsigned char)C)) {
>     O << C;
>   } else {

Applied, thanks!
http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20090119/072562.html

-Chris




More information about the llvm-dev mailing list