Skip to content

Commit

Permalink
Mark the aliases function for target-specific relocation.
Browse files Browse the repository at this point in the history
  • Loading branch information
maleadt committed Sep 18, 2020
1 parent 8064e00 commit 2898b93
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/llvm-multiversioning.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -711,6 +711,12 @@ void CloneCtx::rewrite_alias(GlobalAlias *alias, Function *F)
uint32_t id;
GlobalVariable *slot;
std::tie(id, slot) = get_reloc_slot(F);
for (auto &grp: groups) {
grp.relocs.insert(id);
for (auto &tgt: grp.clones) {
tgt.relocs.insert(id);
}
}

auto BB = BasicBlock::Create(ctx, "top", trampoline);
IRBuilder<> irbuilder(BB);
Expand Down

0 comments on commit 2898b93

Please sign in to comment.