Skip to content
Snippets Groups Projects
Commit 8288cd63 authored by Iain Buclaw's avatar Iain Buclaw
Browse files

d: Construct indexes of ARRAY_TYPE using ARRAY_REF.

This is a small simplification over `((T *)&array)[index]', which also
allows eliding an unneccesary marking of TREE_ADDRESSABLE when the array
expression is a parameter or variable declaration.

gcc/d/ChangeLog:

	* d-codegen.cc (build_array_index): Rename to...
	(build_pointer_index): ...this.
	* d-tree.h (build_array_index): Rename declaration to...
	(build_pointer_index): ...this.
	* expr.cc (ExprVisitor::visit (IndexExp *)): Construct indexes of
	ARRAY_TYPE using ARRAY_REF.
	(ExprVisitor::visit (SliceExp *)): Update.
	* intrinsics.cc (expand_intrinsic_bt): Update.
parent d97f3bca
No related branches found
No related tags found
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment