diff options
| author | Chris Lattner <sabre@nondot.org> | 2010-07-12 00:57:28 +0000 |
|---|---|---|
| committer | Chris Lattner <sabre@nondot.org> | 2010-07-12 00:57:28 +0000 |
| commit | 601e390a3b1bd2807f2e87a8ca3df45cf3ed8664 (patch) | |
| tree | 67b7aeec255f079a8aeb7e270998647fb566b993 /llvm/lib/Transforms/IPO | |
| parent | e35d70fafa065307a97aed65f2e985ffb6365865 (diff) | |
| download | bcm5719-llvm-601e390a3b1bd2807f2e87a8ca3df45cf3ed8664.tar.gz bcm5719-llvm-601e390a3b1bd2807f2e87a8ca3df45cf3ed8664.zip | |
make the prototypes for CreateMalloc and CreateFree more consistent. Patch
by Hans Vandierendonck from PR7605
llvm-svn: 108116
Diffstat (limited to 'llvm/lib/Transforms/IPO')
| -rw-r--r-- | llvm/lib/Transforms/IPO/GlobalOpt.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/Transforms/IPO/GlobalOpt.cpp b/llvm/lib/Transforms/IPO/GlobalOpt.cpp index b8a44f7984a..9b5511f3f21 100644 --- a/llvm/lib/Transforms/IPO/GlobalOpt.cpp +++ b/llvm/lib/Transforms/IPO/GlobalOpt.cpp @@ -1307,7 +1307,7 @@ static GlobalVariable *PerformHeapAllocSRoA(GlobalVariable *GV, CallInst *CI, const Type *IntPtrTy = TD->getIntPtrType(CI->getContext()); Value *NMI = CallInst::CreateMalloc(CI, IntPtrTy, FieldTy, ConstantInt::get(IntPtrTy, TypeSize), - NElems, + NElems, 0, CI->getName() + ".f" + Twine(FieldNo)); FieldMallocs.push_back(NMI); new StoreInst(NMI, NGV, CI); @@ -1536,7 +1536,7 @@ static bool TryToOptimizeStoreOfMallocToGlobal(GlobalVariable *GV, Value *NumElements = ConstantInt::get(IntPtrTy, AT->getNumElements()); Instruction *Malloc = CallInst::CreateMalloc(CI, IntPtrTy, AllocSTy, AllocSize, NumElements, - CI->getName()); + 0, CI->getName()); Instruction *Cast = new BitCastInst(Malloc, CI->getType(), "tmp", CI); CI->replaceAllUsesWith(Cast); CI->eraseFromParent(); |

