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