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 | f63c41033a6608f57173297d44b161efc1c3851d (patch) | |
tree | 60b7920bdac4d9b3689d0b15c729dce5cbc12f82 | |
parent | 746d546877a354a0d94ab0bc67775d040022a2b6 (diff) | |
download | external_llvm-f63c41033a6608f57173297d44b161efc1c3851d.zip external_llvm-f63c41033a6608f57173297d44b161efc1c3851d.tar.gz external_llvm-f63c41033a6608f57173297d44b161efc1c3851d.tar.bz2 |
CreateIntCast takes an "isSigned" parameter. Pass "true" for it, rather than
a name.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@88908 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | lib/Transforms/Scalar/SimplifyLibCalls.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/Transforms/Scalar/SimplifyLibCalls.cpp b/lib/Transforms/Scalar/SimplifyLibCalls.cpp index 296f0c9..611505e 100644 --- a/lib/Transforms/Scalar/SimplifyLibCalls.cpp +++ b/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())) |