121 this->current_option = none_opt; |
121 this->current_option = none_opt; |
122 this->search_name = get_var_name_c::get_name(variable); |
122 this->search_name = get_var_name_c::get_name(variable); |
123 search_scope->accept(*this); |
123 search_scope->accept(*this); |
124 return this->current_option; |
124 return this->current_option; |
125 } |
125 } |
|
126 |
|
127 |
|
128 |
|
129 /* This is a temporary fix. Hopefully, once I clean up stage4 code, and I change the way |
|
130 * we generate C code, this function will no longer be needed! |
|
131 */ |
|
132 #include <typeinfo> /* required for typeid() */ |
|
133 bool search_var_instance_decl_c::type_is_complex(symbol_c *symbol) { |
|
134 symbol_c *decl; |
|
135 search_base_type_c search_base_type; |
|
136 |
|
137 decl = this->get_decl(symbol); |
|
138 if (NULL == decl) ERROR; |
|
139 decl = search_base_type.get_basetype_decl(decl); |
|
140 if (NULL == decl) ERROR; |
|
141 |
|
142 return ((typeid( *(decl) ) == typeid( array_specification_c )) || |
|
143 // (typeid( *(decl) ) == typeid( array_spec_init_c )) || /* does not seem to be necessary */ |
|
144 (typeid( *(decl) ) == typeid( structure_type_declaration_c )) || |
|
145 (typeid( *(decl) ) == typeid( structure_element_declaration_list_c )) || |
|
146 // (typeid( *(decl) ) == typeid( structure_type_declaration_c )) || /* does not seem to be necessary */ |
|
147 (typeid( *(decl) ) == typeid( initialized_structure_c )) |
|
148 |
|
149 ); |
|
150 } |
|
151 |
|
152 |
126 |
153 |
127 /***************************/ |
154 /***************************/ |
128 /* B 0 - Programming Model */ |
155 /* B 0 - Programming Model */ |
129 /***************************/ |
156 /***************************/ |
130 void *search_var_instance_decl_c::visit(library_c *symbol) { |
157 void *search_var_instance_decl_c::visit(library_c *symbol) { |