aboutsummaryrefslogtreecommitdiffstats
path: root/lib/VMCore/Instructions.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2010-07-12 00:57:28 +0000
committerChris Lattner <sabre@nondot.org>2010-07-12 00:57:28 +0000
commit5a30a8574cbcd3b385b1e8681c6a5c45856efb38 (patch)
tree5cde2f2fe28ceb143ff2aa7a92d34c913b01a038 /lib/VMCore/Instructions.cpp
parent0bfd09201efdbba5fb70039ebf1c8aefc673cde1 (diff)
downloadexternal_llvm-5a30a8574cbcd3b385b1e8681c6a5c45856efb38.tar.gz
external_llvm-5a30a8574cbcd3b385b1e8681c6a5c45856efb38.tar.bz2
external_llvm-5a30a8574cbcd3b385b1e8681c6a5c45856efb38.zip
make the prototypes for CreateMalloc and CreateFree more consistent. Patch
by Hans Vandierendonck from PR7605 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108116 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/VMCore/Instructions.cpp')
-rw-r--r--lib/VMCore/Instructions.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/VMCore/Instructions.cpp b/lib/VMCore/Instructions.cpp
index a063659218..a32cb3c871 100644
--- a/lib/VMCore/Instructions.cpp
+++ b/lib/VMCore/Instructions.cpp
@@ -471,9 +471,10 @@ static Instruction *createMalloc(Instruction *InsertBefore,
Instruction *CallInst::CreateMalloc(Instruction *InsertBefore,
const Type *IntPtrTy, const Type *AllocTy,
Value *AllocSize, Value *ArraySize,
+ Function * MallocF,
const Twine &Name) {
return createMalloc(InsertBefore, NULL, IntPtrTy, AllocTy, AllocSize,
- ArraySize, NULL, Name);
+ ArraySize, MallocF, Name);
}
/// CreateMalloc - Generate the IR for a call to malloc:
@@ -525,8 +526,8 @@ static Instruction* createFree(Value* Source, Instruction *InsertBefore,
}
/// CreateFree - Generate the IR for a call to the builtin free function.
-void CallInst::CreateFree(Value* Source, Instruction *InsertBefore) {
- createFree(Source, InsertBefore, NULL);
+Instruction * CallInst::CreateFree(Value* Source, Instruction *InsertBefore) {
+ return createFree(Source, InsertBefore, NULL);
}
/// CreateFree - Generate the IR for a call to the builtin free function.