Skip to content

Commit dbf43b3

Browse files
committed
export jl_struct_to_llvm
1 parent eef6bac commit dbf43b3

File tree

3 files changed

+11
-1
lines changed

3 files changed

+11
-1
lines changed

src/cgutils.cpp

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -659,7 +659,14 @@ static Type *julia_type_to_llvm(jl_codectx_t &ctx, jl_value_t *jt, bool *isboxed
659659
extern "C" JL_DLLEXPORT_CODEGEN
660660
Type *jl_type_to_llvm_impl(jl_value_t *jt, LLVMContextRef ctxt, bool *isboxed)
661661
{
662-
return _julia_type_to_llvm(NULL, *unwrap(ctxt), jt, isboxed, isboxed == nullptr);
662+
return _julia_type_to_llvm(NULL, *unwrap(ctxt), jt, isboxed, false);
663+
}
664+
665+
666+
extern "C" JL_DLLEXPORT_CODEGEN
667+
Type *jl_struct_to_llvm_impl(jl_value_t *jt, LLVMContextRef ctxt, bool *isboxed)
668+
{
669+
return _julia_type_to_llvm(NULL, *unwrap(ctxt), jt, isboxed, true);
663670
}
664671

665672

src/codegen-stubs.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,8 @@ JL_DLLEXPORT LLVMOrcThreadSafeModuleRef jl_get_llvm_module_fallback(void *native
9898

9999
JL_DLLEXPORT void *jl_type_to_llvm_fallback(jl_value_t *jt, LLVMContextRef llvmctxt, bool_t *isboxed) UNAVAILABLE
100100

101+
JL_DLLEXPORT void *jl_struct_to_llvm_fallback(jl_value_t *jt, LLVMContextRef llvmctxt, bool_t *isboxed) UNAVAILABLE
102+
101103
JL_DLLEXPORT jl_value_t *jl_get_libllvm_fallback(void) JL_NOTSAFEPOINT
102104
{
103105
return jl_nothing;

src/jl_exported_funcs.inc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -543,6 +543,7 @@
543543
YY(jl_dump_llvm_opt) \
544544
YY(jl_dump_fptr_asm) \
545545
YY(jl_get_function_id) \
546+
YY(jl_struct_to_llvm) \
546547
YY(jl_type_to_llvm) \
547548
YY(jl_getUnwindInfo) \
548549
YY(jl_get_libllvm) \

0 commit comments

Comments
 (0)