if (msg != NULL_TREE)
- return build_libcall (libcall, Type::tvoid, 3, msg, file, line);
+ return build_libcall (libcall, Type::tnoreturn, 3, msg, file, line);
else
- return build_libcall (libcall, Type::tvoid, 2, file, line);
+ return build_libcall (libcall, Type::tnoreturn, 2, file, line);
}
/* Builds a CALL_EXPR at location LOC in the source file to execute when an
return build_call_expr (builtin_decl_explicit (BUILT_IN_TRAP), 0);
else
{
- return build_libcall (LIBCALL_ARRAYBOUNDSP, Type::tvoid, 2,
+ return build_libcall (LIBCALL_ARRAYBOUNDSP, Type::tnoreturn, 2,
build_filename_from_loc (loc),
size_int (loc.linnum ()));
}
boundserr = build_call_expr (builtin_decl_explicit (BUILT_IN_TRAP), 0);
else
{
- boundserr = build_libcall (LIBCALL_ARRAYBOUNDS_INDEXP, Type::tvoid, 4,
+ boundserr = build_libcall (LIBCALL_ARRAYBOUNDS_INDEXP, Type::tnoreturn, 4,
build_filename_from_loc (ie->e2->loc),
size_int (ie->e2->loc.linnum ()),
index, length);
else
{
boundserr = build_libcall (LIBCALL_ARRAYBOUNDS_SLICEP,
- Type::tvoid, 5,
+ Type::tnoreturn, 5,
build_filename_from_loc (se->loc),
size_int (se->loc.linnum ()),
lower, upper, length);
#define RT(T1) LCT_ ## T1
/* Used when an assert() contract fails. */
-DEF_D_RUNTIME (ASSERTP, "_d_assertp", RT(VOID), P2(IMMUTABLE_CHARPTR, UINT),
+DEF_D_RUNTIME (ASSERTP, "_d_assertp", RT(NORETURN), P2(IMMUTABLE_CHARPTR, UINT),
ECF_NORETURN)
-DEF_D_RUNTIME (ASSERT_MSG, "_d_assert_msg", RT(VOID), P3(STRING, STRING, UINT),
+DEF_D_RUNTIME (ASSERT_MSG, "_d_assert_msg", RT(NORETURN),
+ P3(STRING, STRING, UINT),
ECF_NORETURN)
/* Used when an assert() contract fails in a unittest function. */
-DEF_D_RUNTIME (UNITTESTP, "_d_unittestp", RT(VOID), P2(IMMUTABLE_CHARPTR, UINT),
+DEF_D_RUNTIME (UNITTESTP, "_d_unittestp", RT(NORETURN),
+ P2(IMMUTABLE_CHARPTR, UINT),
ECF_NORETURN)
-DEF_D_RUNTIME (UNITTEST_MSG, "_d_unittest_msg", RT(VOID),
+DEF_D_RUNTIME (UNITTEST_MSG, "_d_unittest_msg", RT(NORETURN),
P3(STRING, STRING, UINT), ECF_NORETURN)
/* Used when an array index outside the bounds of its range. */
-DEF_D_RUNTIME (ARRAYBOUNDSP, "_d_arrayboundsp", RT(VOID),
+DEF_D_RUNTIME (ARRAYBOUNDSP, "_d_arrayboundsp", RT(NORETURN),
P2(IMMUTABLE_CHARPTR, UINT), ECF_NORETURN)
-DEF_D_RUNTIME (ARRAYBOUNDS_SLICEP, "_d_arraybounds_slicep", RT(VOID),
+DEF_D_RUNTIME (ARRAYBOUNDS_SLICEP, "_d_arraybounds_slicep", RT(NORETURN),
P5(IMMUTABLE_CHARPTR, UINT, SIZE_T, SIZE_T, SIZE_T),
ECF_NORETURN)
-DEF_D_RUNTIME (ARRAYBOUNDS_INDEXP, "_d_arraybounds_indexp", RT(VOID),
+DEF_D_RUNTIME (ARRAYBOUNDS_INDEXP, "_d_arraybounds_indexp", RT(NORETURN),
P4(IMMUTABLE_CHARPTR, UINT, SIZE_T, SIZE_T), ECF_NORETURN)
/* Used when calling delete on a stack-allocated class or interface. */
P2(ARRAYPTR_BYTE, DCHAR), 0)
/* Used for throw() expressions. */
-DEF_D_RUNTIME (THROW, "_d_throw", RT(VOID), P1(OBJECT), ECF_NORETURN)
+DEF_D_RUNTIME (THROW, "_d_throw", RT(NORETURN), P1(OBJECT), ECF_NORETURN)
DEF_D_RUNTIME (BEGIN_CATCH, "__gdc_begin_catch", RT(VOIDPTR), P1(VOIDPTR), 0)
/* C++ exception handlers. */