LLVMContext changes up to r77366

This commit is contained in:
Benjamin Kramer
2009-07-30 15:25:10 +02:00
parent 3f0a0686a8
commit 66101517d7
19 changed files with 113 additions and 114 deletions

View File

@@ -82,8 +82,8 @@ LLGlobalVariable * IrStruct::getClassInfoSymbol()
// Construct the fields
MDNodeField* mdVals[CD_NumFields];
mdVals[CD_BodyType] = llvm::UndefValue::get(bodyType);
mdVals[CD_Finalize] = gIR->context().getConstantInt(LLType::Int1Ty, hasDestructor);
mdVals[CD_CustomDelete] = gIR->context().getConstantInt(LLType::Int1Ty, hasCustomDelete);
mdVals[CD_Finalize] = LLConstantInt::get(LLType::Int1Ty, hasDestructor);
mdVals[CD_CustomDelete] = LLConstantInt::get(LLType::Int1Ty, hasCustomDelete);
// Construct the metadata
llvm::MDNode* metadata = gIR->context().getMDNode(mdVals, CD_NumFields);
// Insert it into the module
@@ -170,7 +170,7 @@ LLConstant * IrStruct::getVtblInit()
}
// build the constant struct
constVtbl = gIR->context().getConstantStruct(constants, false);
constVtbl = LLConstantStruct::get(constants, false);
#if 0
IF_LOG Logger::cout() << "constVtbl type: " << *constVtbl->getType() << std::endl;
@@ -314,7 +314,7 @@ LLConstant * IrStruct::createClassDefaultInitializer()
addBaseClassInits(constants, cd, offset, field_index);
// build the constant
llvm::Constant* definit = gIR->context().getConstantStruct(constants, false);
llvm::Constant* definit = LLConstantStruct::get(constants, false);
return definit;
}
@@ -382,7 +382,7 @@ llvm::GlobalVariable * IrStruct::getInterfaceVtbl(BaseClass * b, bool new_instan
}
// build the vtbl constant
llvm::Constant* vtbl_constant = gIR->context().getConstantStruct(constants, false);
llvm::Constant* vtbl_constant = LLConstantStruct::get(constants, false);
// create the global variable to hold it
llvm::GlobalValue::LinkageTypes _linkage = DtoExternalLinkage(aggrdecl);
@@ -481,7 +481,7 @@ LLConstant * IrStruct::getClassInfoInterfaces()
// create Interface struct
LLConstant* inits[3] = { ci, vtb, off };
LLConstant* entry = gIR->context().getConstantStruct(inits, 3);
LLConstant* entry = LLConstantStruct::get(inits, 3);
constants.push_back(entry);
}
@@ -490,7 +490,7 @@ LLConstant * IrStruct::getClassInfoInterfaces()
constants[0]->getType(),
n);
LLConstant* arr = gIR->context().getConstantArray(
LLConstant* arr = LLConstantArray::get(
array_type,
&constants[0],
n);