Skip to content

Commit

Permalink
Add GotoTarget, skip do_loops/inline pass
Browse files Browse the repository at this point in the history
  • Loading branch information
Smit-create committed Apr 4, 2023
1 parent 468ff6d commit 5b38933
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
5 changes: 2 additions & 3 deletions src/libasr/codegen/asr_to_c_cpp.h
Original file line number Diff line number Diff line change
Expand Up @@ -1927,9 +1927,8 @@ R"(#include <stdio.h>
gotoid2name[x.m_target_id] = std::string(x.m_name);
}

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

void visit_Stop(const ASR::Stop_t &x) {
Expand Down
6 changes: 4 additions & 2 deletions src/libasr/pass/pass_manager.h
Original file line number Diff line number Diff line change
Expand Up @@ -196,11 +196,13 @@ namespace LCompilers {
"inline_function_calls"
};

// These are well re-write passes which are already handled
// These are re-write passes which are already handled
// appropriately in C backend.
_c_skip_passes = {
"pass_list_expr",
"print_list_tuple"
"print_list_tuple",
"do_loops",
"inline_function_calls"
};
_user_defined_passes.clear();
}
Expand Down

0 comments on commit 5b38933

Please sign in to comment.