mirror of
https://github.com/ldc-developers/ldc.git
synced 2025-05-08 20:06:03 +03:00
Fixed signature of _d_delarray()
This commit is contained in:
parent
fd73072371
commit
0cc3dc369a
2 changed files with 11 additions and 1 deletions
|
@ -86,10 +86,15 @@ void DtoDeleteArray(DValue* arr)
|
|||
{
|
||||
// get runtime function
|
||||
llvm::Function* fn = LLVM_D_GetRuntimeFunction(gIR->module, "_d_delarray");
|
||||
|
||||
// build args
|
||||
LLSmallVector<LLValue*,2> arg;
|
||||
#if DMDV2
|
||||
arg.push_back(DtoBitCast(arr->getLVal(), fn->getFunctionType()->getParamType(0)));
|
||||
#else
|
||||
arg.push_back(DtoArrayLen(arr));
|
||||
arg.push_back(DtoBitCast(DtoArrayPtr(arr), getVoidPtrType(), ".tmp"));
|
||||
#endif
|
||||
// call
|
||||
gIR->CreateCallOrInvoke(fn, arg.begin(), arg.end());
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue