diff options
author | Andrew Pinski <quic_apinski@quicinc.com> | 2025-03-19 17:30:00 -0700 |
---|---|---|
committer | CohenArthur <arthur.cohen@embecosm.com> | 2025-04-10 15:53:50 +0000 |
commit | 4b64c35a8f6093eb3851f9149e2465117c392492 (patch) | |
tree | 3772bb29d6fb70587aedba2a84f37094c00d2cf6 /gcc/rust/hir | |
parent | 2a46a5a37a7364951e0578605e2f763ba0a2cde4 (diff) | |
download | gcc-4b64c35a8f6093eb3851f9149e2465117c392492.zip gcc-4b64c35a8f6093eb3851f9149e2465117c392492.tar.gz gcc-4b64c35a8f6093eb3851f9149e2465117c392492.tar.bz2 |
rust: Use error_operand_p in rust-gcc.cc
Just a simple cleanupof the code to use error_operand_p
instead of directly comparing against error_mark_node.
This also moves some cdoe around when dealing with error_operand_p
just to be faster and/or slightly tighten up the code slightly.
gcc/rust/ChangeLog:
* rust-gcc.cc (Bvariable::get_tree): Use error_operand_p.
(pointer_type): Likewise.
(reference_type): Likewise.
(immutable_type): Likewise.
(function_type): Likewise.
(function_type_variadic): Likewise.
Cleanup the check for receiver.type first.
(function_ptr_type): Use error_operand_p.
(fill_in_fields): Likewise.
(fill_in_array): Likewise.
(named_type): Likewise.
(type_size): Likewise.
(type_alignment): Likewise.
(type_field_alignment): Likewise.
(type_field_offset): Likewise.
(zero_expression): Likewise.
(float_constant_expression): Likewise.
(convert_expression): Likewise.
(struct_field_expression): Likewise.
(compound_expression): Likewise.
(conditional_expression): Likewise.
(negation_expression): Likewise.
(arithmetic_or_logical_expression): Likewise.
(arithmetic_or_logical_expression_checked): Likewise.
(comparison_expression): Likewise.
(lazy_boolean_expression): Likewise.
(constructor_expression): Likewise.
(array_constructor_expression): Likewise.
(array_index_expression): Likewise.
(call_expression): Likewise.
(init_statement): Likewise.
(assignment_statement): Likewise.
(return_statement): Likewise.
(exception_handler_statement): Likewise.
(if_statement): Likewise.
(compound_statement): Likewise.
Tighten up the code, removing t variable.
(statement_list): Use error_operand_p.
(block): Likewise.
(block_add_statements): Likewise.
(convert_tree): Likewise.
(global_variable): Likewise.
(global_variable_set_init): Likewise.
(local_variable): Likewise.
(parameter_variable): Likewise.
(static_chain_variable): Likewise.
(temporary_variable): Likewise.
(function): Likewise. Tighten up the code.
(function_defer_statement): Use error_operand_p.
(function_set_parameters): Use error_operand_p.
(write_global_definitions): Use error_operand_p.
Tighten up the code around the loop.
Signed-off-by: Andrew Pinski <quic_apinski@quicinc.com>
Diffstat (limited to 'gcc/rust/hir')
0 files changed, 0 insertions, 0 deletions