summaryrefslogtreecommitdiff
path: root/lib/VMCore/Core.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/VMCore/Core.cpp')
-rw-r--r--lib/VMCore/Core.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/VMCore/Core.cpp b/lib/VMCore/Core.cpp
index c35c85dcc0..8c9626af57 100644
--- a/lib/VMCore/Core.cpp
+++ b/lib/VMCore/Core.cpp
@@ -670,8 +670,8 @@ void LLVMSetGlobalConstant(LLVMValueRef GlobalVar, int IsConstant) {
LLVMValueRef LLVMAddFunction(LLVMModuleRef M, const char *Name,
LLVMTypeRef FunctionTy) {
- return wrap(new Function(unwrap<FunctionType>(FunctionTy),
- GlobalValue::ExternalLinkage, Name, unwrap(M)));
+ return wrap(Function::Create(unwrap<FunctionType>(FunctionTy),
+ GlobalValue::ExternalLinkage, Name, unwrap(M)));
}
LLVMValueRef LLVMGetNamedFunction(LLVMModuleRef M, const char *Name) {
@@ -864,14 +864,14 @@ LLVMBasicBlockRef LLVMGetPreviousBasicBlock(LLVMBasicBlockRef BB) {
}
LLVMBasicBlockRef LLVMAppendBasicBlock(LLVMValueRef FnRef, const char *Name) {
- return wrap(new BasicBlock(Name, unwrap<Function>(FnRef)));
+ return wrap(BasicBlock::Create(Name, unwrap<Function>(FnRef)));
}
LLVMBasicBlockRef LLVMInsertBasicBlock(LLVMBasicBlockRef InsertBeforeBBRef,
const char *Name) {
BasicBlock *InsertBeforeBB = unwrap(InsertBeforeBBRef);
- return wrap(new BasicBlock(Name, InsertBeforeBB->getParent(),
- InsertBeforeBB));
+ return wrap(BasicBlock::Create(Name, InsertBeforeBB->getParent(),
+ InsertBeforeBB));
}
void LLVMDeleteBasicBlock(LLVMBasicBlockRef BBRef) {