aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEvan Cheng <evan.cheng@apple.com>2006-06-16 18:37:15 +0000
committerEvan Cheng <evan.cheng@apple.com>2006-06-16 18:37:15 +0000
commitfb9d0dce976452f878e5bfd768f1ba35b182c33d (patch)
treec1b231b9e0cb1da59f228c91016e264d344dfd76
parent8f60d54fb13191942e6fea832a2aed8338a86fc8 (diff)
Add missing casts. This fixed some regressions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28834 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--lib/Transforms/IPO/SimplifyLibCalls.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/Transforms/IPO/SimplifyLibCalls.cpp b/lib/Transforms/IPO/SimplifyLibCalls.cpp
index b598fc5a39..d8415d74b8 100644
--- a/lib/Transforms/IPO/SimplifyLibCalls.cpp
+++ b/lib/Transforms/IPO/SimplifyLibCalls.cpp
@@ -1340,7 +1340,7 @@ public:
if (!puts_func)
return false;
std::vector<Value*> args;
- args.push_back(ci->getOperand(2));
+ args.push_back(CastToCStr(ci->getOperand(2), *ci));
new CallInst(puts_func,args,ci->getName(),ci);
ci->replaceAllUsesWith(ConstantSInt::get(Type::IntTy,len));
break;
@@ -1474,7 +1474,7 @@ public:
if (!fputs_func)
return false;
std::vector<Value*> args;
- args.push_back(ci->getOperand(3));
+ args.push_back(CastToCStr(ci->getOperand(3), *ci));
args.push_back(ci->getOperand(1));
new CallInst(fputs_func,args,ci->getName(),ci);
ci->replaceAllUsesWith(ConstantSInt::get(Type::IntTy,len));