diff options
author | Duncan Sands <baldrick@free.fr> | 2009-11-16 12:32:28 +0000 |
---|---|---|
committer | Duncan Sands <baldrick@free.fr> | 2009-11-16 12:32:28 +0000 |
commit | e5de4a9ad6cd9443e1bd4c185c2da36f0f32ec45 (patch) | |
tree | 84d6a68da66f1bdd8507e2062c74d7c877f1b42c /llvm/lib/Transforms/Scalar/SimplifyLibCalls.cpp | |
parent | 00e87d19f523837e24159ee2db3a6d2c4a249ed4 (diff) | |
download | bcm5719-llvm-e5de4a9ad6cd9443e1bd4c185c2da36f0f32ec45.tar.gz bcm5719-llvm-e5de4a9ad6cd9443e1bd4c185c2da36f0f32ec45.zip |
CreateIntCast takes an "isSigned" parameter. Pass "true" for it, rather than
a name.
llvm-svn: 88908
Diffstat (limited to 'llvm/lib/Transforms/Scalar/SimplifyLibCalls.cpp')
-rw-r--r-- | llvm/lib/Transforms/Scalar/SimplifyLibCalls.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/llvm/lib/Transforms/Scalar/SimplifyLibCalls.cpp b/llvm/lib/Transforms/Scalar/SimplifyLibCalls.cpp index 296f0c9ac54..611505ef363 100644 --- a/llvm/lib/Transforms/Scalar/SimplifyLibCalls.cpp +++ b/llvm/lib/Transforms/Scalar/SimplifyLibCalls.cpp @@ -259,6 +259,7 @@ Value *LibCallOptimization::EmitPutChar(Value *Char, IRBuilder<> &B) { CallInst *CI = B.CreateCall(PutChar, B.CreateIntCast(Char, Type::getInt32Ty(*Context), + /*isSigned*/true, "chari"), "putchar"); @@ -303,7 +304,8 @@ void LibCallOptimization::EmitFPutC(Value *Char, Value *File, IRBuilder<> &B) { 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())) |