LLVMValueRef LLVMBuildMalloc(LLVMBuilderRef B, LLVMTypeRef Ty,
const char *Name) {
const Type* IntPtrT = Type::getInt32Ty(unwrap(B)->GetInsertBlock()->getContext());
- return wrap(CallInst::CreateMalloc(unwrap(B)->GetInsertBlock(), IntPtrT,
- unwrap(Ty), 0, 0, Twine(Name)));
+ return wrap(unwrap(B)->Insert(CallInst::CreateMalloc(
+ unwrap(B)->GetInsertBlock(), IntPtrT, unwrap(Ty), 0, 0, ""),
+ Twine(Name)));
}
LLVMValueRef LLVMBuildArrayMalloc(LLVMBuilderRef B, LLVMTypeRef Ty,
LLVMValueRef Val, const char *Name) {
const Type* IntPtrT = Type::getInt32Ty(unwrap(B)->GetInsertBlock()->getContext());
- return wrap(CallInst::CreateMalloc(unwrap(B)->GetInsertBlock(), IntPtrT,
- unwrap(Ty), unwrap(Val), 0, Twine(Name)));
+ return wrap(unwrap(B)->Insert(CallInst::CreateMalloc(
+ unwrap(B)->GetInsertBlock(), IntPtrT, unwrap(Ty), unwrap(Val), 0, ""),
+ Twine(Name)));
}
LLVMValueRef LLVMBuildAlloca(LLVMBuilderRef B, LLVMTypeRef Ty,