Change the MallocInst & AllocaInst ctors to take the allocated type, not the

pointer type returned.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3711 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Chris Lattner
2002-09-13 22:28:50 +00:00
parent 05804b7459
commit e87e1c9aa9
5 changed files with 33 additions and 13 deletions

View File

@@ -1639,9 +1639,8 @@ void PoolAllocate::CreatePools(Function *F, const vector<AllocDSNode*> &Allocs,
"Pool type should not be abstract anymore!");
// Add an allocation and a free for each pool...
AllocaInst *PoolAlloc
= new AllocaInst(PointerType::get(PI.PoolType), 0,
CurModule->getTypeName(PI.PoolType));
AllocaInst *PoolAlloc = new AllocaInst(PI.PoolType, 0,
CurModule->getTypeName(PI.PoolType));
PI.Handle = PoolAlloc;
EntryNodeInsts.push_back(PoolAlloc);
AllocationInst *AI = Allocs[i]->getAllocation();