Skip to content

Commit 5b38933

Browse files
committed
Add GotoTarget, skip do_loops/inline pass
1 parent 468ff6d commit 5b38933

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

src/libasr/codegen/asr_to_c_cpp.h

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1927,9 +1927,8 @@ R"(#include <stdio.h>
19271927
gotoid2name[x.m_target_id] = std::string(x.m_name);
19281928
}
19291929

1930-
void visit_GoToTarget(const ASR::GoToTarget_t & /* x */) {
1931-
// Ignore for now
1932-
src = "";
1930+
void visit_GoToTarget(const ASR::GoToTarget_t &x) {
1931+
src = std::string(x.m_name) + ":\n";
19331932
}
19341933

19351934
void visit_Stop(const ASR::Stop_t &x) {

src/libasr/pass/pass_manager.h

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -196,11 +196,13 @@ namespace LCompilers {
196196
"inline_function_calls"
197197
};
198198

199-
// These are well re-write passes which are already handled
199+
// These are re-write passes which are already handled
200200
// appropriately in C backend.
201201
_c_skip_passes = {
202202
"pass_list_expr",
203-
"print_list_tuple"
203+
"print_list_tuple",
204+
"do_loops",
205+
"inline_function_calls"
204206
};
205207
_user_defined_passes.clear();
206208
}

0 commit comments

Comments
 (0)