Skip to content

Commit

Permalink
Print prototypes before functors (#1034)
Browse files Browse the repository at this point in the history
  • Loading branch information
Nicolas Cornu authored Apr 21, 2023
1 parent f5bc783 commit f729744
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/codegen/codegen_cpp_visitor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3562,10 +3562,12 @@ void CodegenCVisitor::print_nrn_destructor() {


void CodegenCVisitor::print_functors_definitions() {
codegen = true;
for (const auto& functor_name: info.functor_names) {
printer->add_newline(2);
print_functor_definition(*functor_name.first);
}
codegen = false;
}


Expand Down Expand Up @@ -4585,7 +4587,6 @@ void CodegenCVisitor::print_g_unused() const {

void CodegenCVisitor::print_compute_functions() {
print_top_verbatim_blocks();
print_function_prototypes();
for (const auto& procedure: info.procedures) {
print_procedure(*procedure);
}
Expand Down Expand Up @@ -4633,6 +4634,7 @@ void CodegenCVisitor::print_codegen_routines() {
print_nrn_alloc();
print_nrn_constructor();
print_nrn_destructor();
print_function_prototypes();
print_functors_definitions();
print_compute_functions();
print_check_table_thread_function();
Expand Down

0 comments on commit f729744

Please sign in to comment.