mirror of
https://github.com/ldc-developers/ldc.git
synced 2025-05-03 16:41:06 +03:00
Merge 2.078.0 front-end and stdlibs
This commit is contained in:
parent
f338b559ff
commit
cfad799f48
203 changed files with 9174 additions and 8166 deletions
|
@ -188,7 +188,7 @@ static Type *DtoArrayElementType(Type *arrayType) {
|
|||
static void copySlice(Loc &loc, LLValue *dstarr, LLValue *sz1, LLValue *srcarr,
|
||||
LLValue *sz2, bool knownInBounds) {
|
||||
const bool checksEnabled =
|
||||
global.params.useAssert || gIR->emitArrayBoundsChecks();
|
||||
global.params.useAssert == CHECKENABLEon || gIR->emitArrayBoundsChecks();
|
||||
if (checksEnabled && !knownInBounds) {
|
||||
LLValue *fn = getRuntimeFunction(loc, gIR->module, "_d_array_slice_copy");
|
||||
gIR->CreateCallOrInvoke(fn, dstarr, sz1, srcarr, sz2);
|
||||
|
@ -1379,7 +1379,7 @@ void DtoIndexBoundsCheck(Loc &loc, DValue *arr, DValue *index) {
|
|||
void DtoBoundsCheckFailCall(IRState *irs, Loc &loc) {
|
||||
Module *const module = irs->func()->decl->getModule();
|
||||
|
||||
if (global.params.betterC) {
|
||||
if (global.params.checkAction == CHECKACTION_C) {
|
||||
DtoCAssert(module, loc, DtoConstCString("array overflow"));
|
||||
} else {
|
||||
llvm::Function *errorfn =
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue