API changes for class Use size reduction, wave 1.

Specifically, introduction of XXX::Create methods
for Users that have a potentially variable number of
Uses.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49277 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Gabor Greif
2008-04-06 20:25:17 +00:00
parent d963ab1f58
commit 051a950000
73 changed files with 979 additions and 692 deletions

View File

@@ -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) {