xo-jit: + Jit::mangle()

This commit is contained in:
Roland Conybeare 2024-06-19 18:20:53 -04:00
commit 97aea9d513
2 changed files with 9 additions and 1 deletions

View file

@ -126,9 +126,14 @@ namespace xo {
std::move(ts_module));
}
/** report mangled symbol name **/
auto mangle(StringRef name) {
return this->mangler_(name.str());
}
llvm::Expected<ExecutorSymbolDef> lookup(StringRef name) {
return this->xsession_->lookup({&dest_dynamic_lib_},
this->mangler_(name.str()));
this->mangle(name));
}
/* dump */

View file

@ -95,6 +95,9 @@ namespace xo {
/** dump text description of module contents to console **/
void dump_current_module();
/** report mangle symbol **/
std::string mangle(const std::string & x) const;
/** lookup symbol in jit-associated output library **/
llvm::Expected<llvm::orc::ExecutorAddr> lookup_symbol(const std::string & x);