diff options
Diffstat (limited to 'gcc')
| -rw-r--r-- | gcc/gcc/elna-generic.cc | 15 |
1 files changed, 3 insertions, 12 deletions
diff --git a/gcc/gcc/elna-generic.cc b/gcc/gcc/elna-generic.cc index 77ff61f..bb93270 100644 --- a/gcc/gcc/elna-generic.cc +++ b/gcc/gcc/elna-generic.cc @@ -248,14 +248,9 @@ namespace elna::gcc void generic_visitor::visit(boot::record_constructor_expression *expression) { - tree type_decl = this->symbols->lookup(expression->type_name.name()); + tree record_type = get_inner_alias(expression->type_decoration, this->symbols); + gcc_assert(TREE_CODE(record_type) == RECORD_TYPE); - if (type_decl == NULL_TREE) - { - this->current_expression = error_mark_node; - return; - } - tree record_type = TREE_TYPE(type_decl); vec<constructor_elt, va_gc> *tree_arguments = nullptr; for (const boot::field_initializer& initializer : expression->field_initializers) @@ -271,12 +266,8 @@ namespace elna::gcc void generic_visitor::visit(boot::array_constructor_expression *expression) { tree array_type = get_inner_alias(expression->type_decoration, this->symbols); + gcc_assert(TREE_CODE(array_type) == ARRAY_TYPE); - if (TREE_CODE(array_type) != ARRAY_TYPE) - { - this->current_expression = error_mark_node; - return; - } tree domain = TYPE_DOMAIN(array_type); tree index = TYPE_MIN_VALUE(domain); vec<constructor_elt, va_gc> *tree_arguments = nullptr; |
