From 51e84494f160357f61b616bfb3ce6317ba396669 Mon Sep 17 00:00:00 2001 From: "William S. Moses" Date: Mon, 23 Dec 2024 10:54:31 -0500 Subject: [PATCH] export jl_struct_to_llvm --- src/cgutils.cpp | 9 ++++++++- src/codegen-stubs.c | 2 ++ src/jl_exported_funcs.inc | 1 + 3 files changed, 11 insertions(+), 1 deletion(-) diff --git a/src/cgutils.cpp b/src/cgutils.cpp index 153bc2fe054c0..b377e33a2260c 100644 --- a/src/cgutils.cpp +++ b/src/cgutils.cpp @@ -659,7 +659,14 @@ static Type *julia_type_to_llvm(jl_codectx_t &ctx, jl_value_t *jt, bool *isboxed extern "C" JL_DLLEXPORT_CODEGEN Type *jl_type_to_llvm_impl(jl_value_t *jt, LLVMContextRef ctxt, bool *isboxed) { - return _julia_type_to_llvm(NULL, *unwrap(ctxt), jt, isboxed, isboxed == nullptr); + return _julia_type_to_llvm(NULL, *unwrap(ctxt), jt, isboxed, false); +} + + +extern "C" JL_DLLEXPORT_CODEGEN +Type *jl_struct_to_llvm_impl(jl_value_t *jt, LLVMContextRef ctxt, bool *isboxed) +{ + return _julia_type_to_llvm(NULL, *unwrap(ctxt), jt, isboxed, true); } diff --git a/src/codegen-stubs.c b/src/codegen-stubs.c index 5e243ddda28c9..1c0c22d801b3f 100644 --- a/src/codegen-stubs.c +++ b/src/codegen-stubs.c @@ -114,6 +114,8 @@ JL_DLLEXPORT LLVMOrcThreadSafeModuleRef jl_get_llvm_module_fallback(void *native JL_DLLEXPORT void *jl_type_to_llvm_fallback(jl_value_t *jt, LLVMContextRef llvmctxt, bool_t *isboxed) UNAVAILABLE +JL_DLLEXPORT void *jl_struct_to_llvm_fallback(jl_value_t *jt, LLVMContextRef llvmctxt, bool_t *isboxed) UNAVAILABLE + JL_DLLEXPORT jl_value_t *jl_get_libllvm_fallback(void) JL_NOTSAFEPOINT { return jl_nothing; diff --git a/src/jl_exported_funcs.inc b/src/jl_exported_funcs.inc index cb48cf6f9962c..2ac971300f520 100644 --- a/src/jl_exported_funcs.inc +++ b/src/jl_exported_funcs.inc @@ -544,6 +544,7 @@ YY(jl_dump_fptr_asm) \ YY(jl_emit_native) \ YY(jl_get_function_id) \ + YY(jl_struct_to_llvm) \ YY(jl_type_to_llvm) \ YY(jl_getUnwindInfo) \ YY(jl_get_libllvm) \