summaryrefslogtreecommitdiff
path: root/lib/Transforms/IPO/RaiseAllocations.cpp
diff options
context:
space:
mode:
authorReid Spencer <rspencer@reidspencer.com>2006-12-13 00:50:17 +0000
committerReid Spencer <rspencer@reidspencer.com>2006-12-13 00:50:17 +0000
commit7b06bd532d3324a2f76bbc856ae20ff89d8e0e92 (patch)
treecbd629912f00b8d9d35e320842aca7e1cded803e /lib/Transforms/IPO/RaiseAllocations.cpp
parent31b628ba6096d2b0bb5591b1231a8e4df4f6c8b8 (diff)
downloadllvm-7b06bd532d3324a2f76bbc856ae20ff89d8e0e92.tar.gz
llvm-7b06bd532d3324a2f76bbc856ae20ff89d8e0e92.tar.bz2
llvm-7b06bd532d3324a2f76bbc856ae20ff89d8e0e92.tar.xz
Replace CastInst::createInferredCast calls with more accurate cast
creation calls. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32521 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms/IPO/RaiseAllocations.cpp')
-rw-r--r--lib/Transforms/IPO/RaiseAllocations.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/Transforms/IPO/RaiseAllocations.cpp b/lib/Transforms/IPO/RaiseAllocations.cpp
index 77a9a3d57e..46c6815994 100644
--- a/lib/Transforms/IPO/RaiseAllocations.cpp
+++ b/lib/Transforms/IPO/RaiseAllocations.cpp
@@ -141,8 +141,8 @@ bool RaiseAllocations::runOnModule(Module &M) {
// source size.
if (Source->getType() != Type::UIntTy)
Source =
- CastInst::createInferredCast(Source, Type::UIntTy,
- "MallocAmtCast", I);
+ CastInst::createIntegerCast(Source, Type::UIntTy, false/*ZExt*/,
+ "MallocAmtCast", I);
std::string Name(I->getName()); I->setName("");
MallocInst *MI = new MallocInst(Type::SByteTy, Source, Name, I);
@@ -193,8 +193,8 @@ bool RaiseAllocations::runOnModule(Module &M) {
//
Value *Source = *CS.arg_begin();
if (!isa<PointerType>(Source->getType()))
- Source = CastInst::createInferredCast(
- Source, PointerType::get(Type::SByteTy), "FreePtrCast", I);
+ Source = new IntToPtrInst(Source, PointerType::get(Type::SByteTy),
+ "FreePtrCast", I);
new FreeInst(Source, I);
// If the old instruction was an invoke, add an unconditional branch