Fix some LLVM 16 deprecations wrt. DataLayout::getABITypeAlignment() and llvm::makeArrayRef()

This commit is contained in:
Martin Kinkelin 2023-08-12 22:49:19 +02:00
parent 2e39008fad
commit c8857e8cb8
7 changed files with 14 additions and 23 deletions

View file

@ -624,11 +624,10 @@ void initializeArrayLiteral(IRState *p, ArrayLiteralExp *ale,
////////////////////////////////////////////////////////////////////////////////
LLConstant *DtoConstSlice(LLConstant *dim, LLConstant *ptr, Type *type) {
LLConstant *values[2] = {dim, ptr};
llvm::ArrayRef<LLConstant *> valuesRef = llvm::makeArrayRef(values, 2);
LLStructType *lltype =
type ? isaStruct(DtoType(type))
: LLConstantStruct::getTypeForElements(gIR->context(), valuesRef);
return LLConstantStruct::get(lltype, valuesRef);
: LLConstantStruct::getTypeForElements(gIR->context(), values);
return LLConstantStruct::get(lltype, values);
}
////////////////////////////////////////////////////////////////////////////////