mirror of
https://github.com/ldc-developers/ldc.git
synced 2025-04-30 23:20:40 +03:00
Fix some LLVM 16 deprecations wrt. DataLayout::getABITypeAlignment() and llvm::makeArrayRef()
This commit is contained in:
parent
2e39008fad
commit
c8857e8cb8
7 changed files with 14 additions and 23 deletions
|
@ -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);
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue