From b3706866db1397848f5f7875ecf2c1ae4f4cfc07 Mon Sep 17 00:00:00 2001 From: William Moses Date: Mon, 24 Jul 2023 10:39:02 -1000 Subject: [PATCH] Fix hit c symbol map (#965) --- src/compiler/orcv2.jl | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/compiler/orcv2.jl b/src/compiler/orcv2.jl index cabe16d51b..4037fd70d0 100644 --- a/src/compiler/orcv2.jl +++ b/src/compiler/orcv2.jl @@ -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