From 884b3a29dac8872945caa6c2c4ecee454214008f Mon Sep 17 00:00:00 2001 From: Evan Cheng Date: Fri, 16 Jun 2006 18:37:15 +0000 Subject: [PATCH] Add missing casts. This fixed some regressions. llvm-svn: 28834 --- lib/Transforms/IPO/SimplifyLibCalls.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/Transforms/IPO/SimplifyLibCalls.cpp b/lib/Transforms/IPO/SimplifyLibCalls.cpp index b598fc5a390..d8415d74b84 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 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 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));