Skip to content

Commit

Permalink
Fix hit c symbol map (#965)
Browse files Browse the repository at this point in the history
  • Loading branch information
wsmoses authored Jul 24, 2023
1 parent e28abfe commit b370686
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/compiler/orcv2.jl
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,11 @@ function absolute_symbol_materialization(name, ptr)
address = LLVM.API.LLVMOrcJITTargetAddress(reinterpret(UInt, ptr))
flags = LLVM.API.LLVMJITSymbolFlags(LLVM.API.LLVMJITSymbolGenericFlagsExported, 0)
symbol = LLVM.API.LLVMJITEvaluatedSymbol(address, flags)
gv = LLVM.API.LLVMJITCSymbolMapPair(name, symbol)

gv = if LLVM.version() >= v"15"
LLVM.API.LLVMOrcCSymbolMapPair(name, symbol)
else
LLVM.API.LLVMJITCSymbolMapPair(name, symbol)
end
return LLVM.absolute_symbols(Ref(gv))
end

Expand Down

0 comments on commit b370686

Please sign in to comment.