Skip to content

Commit

Permalink
Fix DelegateGenerator on macOS
Browse files Browse the repository at this point in the history
Commit 785c9df34d ("Restore symbol lookup in child interpreters")
added a DefinitionGenerator to allow symbol lookup in the parent
IncrementalJIT after the upgrade to LLVM 13. It appears that instead
of the unmangled name, we need to lookup already linker mangled names.

This fixes the tests CodeUnloading/AtExit.C and
MultipleInterpreters/MultipleInterpreters.C on macOS, which adds an
underscore during linker mangling. No change on Linux because there
is no additional linker name mangling.
  • Loading branch information
hahnjo authored and jenkins committed Aug 20, 2024
1 parent 6a4cc17 commit dbe8b05
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/Interpreter/IncrementalJIT.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -586,7 +586,7 @@ IncrementalJIT::IncrementalJIT(

std::unique_ptr<llvm::orc::DefinitionGenerator> IncrementalJIT::getGenerator() {
return std::make_unique<DelegateGenerator>(
[&](StringRef UnmangledName) { return Jit->lookup(UnmangledName); });
[&](StringRef Name) { return Jit->lookupLinkerMangled(Name); });
}

void IncrementalJIT::addModule(Transaction& T) {
Expand Down

0 comments on commit dbe8b05

Please sign in to comment.