[llvm-commits] [llvm] r88908 - /llvm/trunk/lib/Transforms/Scalar/SimplifyLibCalls.cpp

Duncan Sands baldrick at free.fr
Mon Nov 16 04:32:28 PST 2009


Author: baldrick
Date: Mon Nov 16 06:32:28 2009
New Revision: 88908

URL: http://llvm.org/viewvc/llvm-project?rev=88908&view=rev
Log:
CreateIntCast takes an "isSigned" parameter.  Pass "true" for it, rather than
a name.

Modified:
    llvm/trunk/lib/Transforms/Scalar/SimplifyLibCalls.cpp

Modified: llvm/trunk/lib/Transforms/Scalar/SimplifyLibCalls.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/SimplifyLibCalls.cpp?rev=88908&r1=88907&r2=88908&view=diff

==============================================================================
--- llvm/trunk/lib/Transforms/Scalar/SimplifyLibCalls.cpp (original)
+++ llvm/trunk/lib/Transforms/Scalar/SimplifyLibCalls.cpp Mon Nov 16 06:32:28 2009
@@ -259,6 +259,7 @@
   CallInst *CI = B.CreateCall(PutChar,
                               B.CreateIntCast(Char,
 					      Type::getInt32Ty(*Context),
+                                              /*isSigned*/true,
 					      "chari"),
                               "putchar");
 
@@ -303,7 +304,8 @@
 			       Type::getInt32Ty(*Context),
 			       Type::getInt32Ty(*Context),
                                File->getType(), NULL);
-  Char = B.CreateIntCast(Char, Type::getInt32Ty(*Context), "chari");
+  Char = B.CreateIntCast(Char, Type::getInt32Ty(*Context), /*isSigned*/true,
+                         "chari");
   CallInst *CI = B.CreateCall2(F, Char, File, "fputc");
 
   if (const Function *Fn = dyn_cast<Function>(F->stripPointerCasts()))





More information about the llvm-commits mailing list