mirror of
https://github.com/ldc-developers/ldc.git
synced 2025-05-02 08:01:11 +03:00
Push the context through StructType::get.
Requires LLVM >= 78258. Also remove old #if's.
This commit is contained in:
parent
de0d74dc68
commit
977fa551ee
22 changed files with 57 additions and 70 deletions
|
@ -26,12 +26,12 @@ const LLStructType* DtoArrayType(Type* arrayTy)
|
|||
const LLType* elemty = DtoType(arrayTy->nextOf());
|
||||
if (elemty == LLType::VoidTy)
|
||||
elemty = LLType::Int8Ty;
|
||||
return LLStructType::get(DtoSize_t(), getPtrToType(elemty), NULL);
|
||||
return LLStructType::get(gIR->context(), DtoSize_t(), getPtrToType(elemty), NULL);
|
||||
}
|
||||
|
||||
const LLStructType* DtoArrayType(const LLType* t)
|
||||
{
|
||||
return LLStructType::get(DtoSize_t(), getPtrToType(t), NULL);
|
||||
return LLStructType::get(gIR->context(), DtoSize_t(), getPtrToType(t), NULL);
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
@ -309,7 +309,7 @@ LLConstant* DtoConstArrayInitializer(ArrayInitializer* arrinit)
|
|||
|
||||
LLConstant* constarr;
|
||||
if (mismatch)
|
||||
constarr = LLConstantStruct::get(initvals);
|
||||
constarr = LLConstantStruct::get(gIR->context(), initvals);
|
||||
else
|
||||
constarr = LLConstantArray::get(LLArrayType::get(llelemty, arrlen), initvals);
|
||||
|
||||
|
@ -394,7 +394,7 @@ void DtoStaticArrayCopy(LLValue* dst, LLValue* src)
|
|||
LLConstant* DtoConstSlice(LLConstant* dim, LLConstant* ptr)
|
||||
{
|
||||
LLConstant* values[2] = { dim, ptr };
|
||||
return LLConstantStruct::get(values, 2);
|
||||
return LLConstantStruct::get(gIR->context(), values, 2);
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue