Skip to content

Commit

Permalink
Merge pull request intel#144 from rschu1ze/rs/fix-libcxx16
Browse files Browse the repository at this point in the history
Fix compilation with libcxx 16
  • Loading branch information
markos authored Mar 29, 2023
2 parents 8c7fdf1 + 8f26c5e commit d054911
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 7 deletions.
9 changes: 9 additions & 0 deletions src/rose/rose_build_program.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -204,6 +204,15 @@ void RoseProgram::add_block(RoseProgram &&block) {
make_move_iterator(block.prog.end()));
}

template<class Iter>
void RoseProgram::replace(Iter it, std::unique_ptr<RoseInstruction> ri) {
assert(!prog.empty());

const RoseInstruction *old_ptr = it->get();
*it = move(ri);
update_targets(prog.begin(), prog.end(), old_ptr, it->get());
}

bytecode_ptr<char> writeProgram(RoseEngineBlob &blob,
const RoseProgram &program) {
u32 total_len = 0;
Expand Down
8 changes: 1 addition & 7 deletions src/rose/rose_build_program.h
Original file line number Diff line number Diff line change
Expand Up @@ -124,13 +124,7 @@ class RoseProgram {
* \brief Replace the instruction pointed to by the given iterator.
*/
template<class Iter>
void replace(Iter it, std::unique_ptr<RoseInstruction> ri) {
assert(!prog.empty());

const RoseInstruction *old_ptr = it->get();
*it = move(ri);
update_targets(prog.begin(), prog.end(), old_ptr, it->get());
}
void replace(Iter it, std::unique_ptr<RoseInstruction> ri);
};

bytecode_ptr<char> writeProgram(RoseEngineBlob &blob,
Expand Down

0 comments on commit d054911

Please sign in to comment.