d: Move generation of array bounds error to own function.
authorIain Buclaw <ibuclaw@gdcproject.org>
Tue, 16 Jun 2020 08:11:07 +0000 (10:11 +0200)
committerIain Buclaw <ibuclaw@gdcproject.org>
Tue, 16 Jun 2020 21:35:34 +0000 (23:35 +0200)
commitf267a3109884c6b623b72f20cbc208561efaf5ff
tree855ddae45ab983915bafb49f5d4a5183a2f7c1c0
parente40b11a91cb345db1324c3cb8f75b01e28056693
d: Move generation of array bounds error to own function.

gcc/d/ChangeLog:

* d-codegen.cc (build_array_bounds_call): New function.
(build_bounds_condition): Use build_array_bounds_call.
* d-lang.cc (d_init_options): Explicitly set default check action to
CHECKACTION_D.
(d_post_options): Set check action to CHECKACTION_C if the flag
-fno-druntime was seen.
* d-tree.h (build_array_bounds_call): Declare.
* expr.cc (ExprVisitor::visit (AssertExp *)): Use
build_array_bounds_call.
gcc/d/d-codegen.cc
gcc/d/d-lang.cc
gcc/d/d-tree.h
gcc/d/expr.cc