Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8454775 commit 88a23f4Copy full SHA for 88a23f4
src/libasr/pass/pass_utils.h
@@ -821,6 +821,14 @@ namespace LCompilers {
821
s_func_type->m_arg_types = arg_types.p;
822
s_func_type->n_arg_types = arg_types.n;
823
s_func_type->m_return_var_type = nullptr;
824
+
825
+ Vec<ASR::stmt_t*> func_body;
826
+ func_body.reserve(al, x->n_body - 1);
827
+ for (size_t i=0; i< x->n_body - 1; i++) {
828
+ func_body.push_back(al, x->m_body[i]);
829
+ }
830
+ x->m_body = func_body.p;
831
+ x->n_body = func_body.n;
832
}
833
834
for (auto &item : x->m_symtab->get_scope()) {
0 commit comments