mirror of
https://github.com/ldc-developers/ldc.git
synced 2025-05-04 09:00:33 +03:00
Use new druntime hooks _d_arraybounds_{slice,index} for more informative RangeErrors
Fixing dmd-testsuite's runnable/testbounds.d.
This commit is contained in:
parent
64d79ef753
commit
fab82436dd
6 changed files with 75 additions and 28 deletions
|
@ -559,6 +559,17 @@ static void buildRuntimeModule() {
|
|||
createFwdDecl(LINK::c, voidTy, {"_d_assert_msg"}, {stringTy, stringTy, uintTy},
|
||||
{}, Attr_Cold_NoReturn);
|
||||
|
||||
// void _d_arraybounds_slice(string file, uint line, size_t lower,
|
||||
// size_t upper, size_t length)
|
||||
createFwdDecl(LINK::c, voidTy, {"_d_arraybounds_slice"},
|
||||
{stringTy, uintTy, sizeTy, sizeTy, sizeTy}, {},
|
||||
Attr_Cold_NoReturn);
|
||||
|
||||
// void _d_arraybounds_index(string file, uint line, size_t index,
|
||||
// size_t length)
|
||||
createFwdDecl(LINK::c, voidTy, {"_d_arraybounds_index"},
|
||||
{stringTy, uintTy, sizeTy, sizeTy}, {}, Attr_Cold_NoReturn);
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue