Skip to content

Commit

Permalink
Codegen C - Handle a new intrinsic for 1.74
Browse files Browse the repository at this point in the history
  • Loading branch information
thepowersgang committed Jul 16, 2024
1 parent 1357dab commit afb25fd
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/trans/codegen_c.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7057,6 +7057,10 @@ namespace {
MIR_BUG(mir_res, "Unknown atomic intrinsic '" << name << "'");
}
}
else if( name == "option_payload_ptr" ) { // 1.74 only, removed later
// Converts `*const Option<T>` to `*const T`, even if `None`
emit_lvalue(e.ret_val); m_of << " = &("; emit_param(e.args.at(0)); m_of << ")->DATA.var_1. _0";
}
// -- stdarg --
else if( name == "va_copy" ) {
m_of << "va_copy( *(va_list*)&"; emit_param(e.args.at(0)); m_of << ", *(va_list*)&"; emit_param(e.args.at(1)); m_of << ")";
Expand Down

0 comments on commit afb25fd

Please sign in to comment.