To protect your data, the CISO officer has suggested users to enable GitLab 2FA as soon as possible.

Commit 046196f2 authored by Isaac Oscar Gariano's avatar Isaac Oscar Gariano
Browse files

Fixed bug with how local names in destination clauses are handled

parent 60842103
......@@ -862,7 +862,14 @@ namespace C
virtual Any<MuDestClause> visitDestClause(UIRParser::DestClauseContext *context) override {
std::string id = gen_temp();
auto vars = accept<std::vector<MuVarNode>>(context->argList());
generate_call(irbuilder + "->new_dest_clause"s, irbuilder, id, accept<MuBBNode>(context->bb()), vars.value, vars.size);
std::string last_parent = parent_names.top();
parent_names.pop();
// local BB names are relative to the enclosing function (not the enclosing block)
auto bb = accept<MuBBNode>(context->bb());
parent_names.push(last_parent);
generate_call(irbuilder + "->new_dest_clause"s, irbuilder, id, bb, vars.value, vars.size);
return id;
}
virtual Any<MuKeepaliveClause> visitKeepaliveClause(UIRParser::KeepaliveClauseContext *context) override {
......
......@@ -790,7 +790,14 @@ namespace Runtime
virtual Any<MuDestClause> visitDestClause(UIRParser::DestClauseContext *context) override {
MuID id = irbuilder->gen_sym(irbuilder, nullptr);
auto vars = accept<std::vector<MuVarNode>>(context->argList());
irbuilder->new_dest_clause(irbuilder, id, accept<MuBBNode>(context->bb()), &vars[0], vars.size());
std::string last_parent = parent_names.top();
parent_names.pop();
// local BB names are relative to the enclosing function (not the enclosing block)
auto bb = accept<MuBBNode>(context->bb());
parent_names.push(last_parent);
irbuilder->new_dest_clause(irbuilder, id, bb, &vars[0], vars.size());
return (MuDestClause)id;
}
virtual Any<MuKeepaliveClause> visitKeepaliveClause(UIRParser::KeepaliveClauseContext *context) override {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment