File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -456,13 +456,13 @@ R"(#include <stdio.h>
456
456
if ( ASR::is_a<ASR::ExternalSymbol_t>(*var_sym) ) {
457
457
ASR::ExternalSymbol_t* v_ext = ASR::down_cast<ASR::ExternalSymbol_t>(var_sym);
458
458
ASR::symbol_t * v_sym = v_ext->m_external ;
459
- // std::cout<<"v_sym: "<<v_sym->type<<" "<<v_ext->m_name<<std::endl;
460
459
if (ASR::is_a<ASR::Variable_t>(*v_sym)) {
461
460
ASR::Variable_t* v = ASR::down_cast<ASR::Variable_t>(v_sym);
462
- char * v_m_name = v->m_name ;
463
- v->m_name = v_ext->m_name ;
464
- decl += indent + self ().convert_variable_decl (*v) + " ;\n " ;
465
- v->m_name = v_m_name;
461
+ if ( v->m_symbolic_value ) {
462
+ this ->visit_expr (*v->m_symbolic_value );
463
+ decl += indent + " #define " + std::string (v_ext->m_name ) + " " + src + " \n " ;
464
+ src.clear ();
465
+ }
466
466
}
467
467
}
468
468
}
You can’t perform that action at this time.
0 commit comments