Skip to content

Commit

Permalink
bindings
Browse files Browse the repository at this point in the history
  • Loading branch information
HertzDevil committed Nov 8, 2023
1 parent 03e16ef commit bc1e273
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/llvm/lib_llvm/core.cr
Original file line number Diff line number Diff line change
Expand Up @@ -183,8 +183,11 @@ lib LibLLVM
fun get_insert_block = LLVMGetInsertBlock(builder : BuilderRef) : BasicBlockRef
fun dispose_builder = LLVMDisposeBuilder(builder : BuilderRef)

{% unless LibLLVM::IS_LT_90 %}
{% if LibLLVM::IS_LT_90 %}
fun set_current_debug_location = LLVMSetCurrentDebugLocation(builder : BuilderRef, l : ValueRef)
{% else %}
fun get_current_debug_location2 = LLVMGetCurrentDebugLocation2(builder : BuilderRef) : MetadataRef
fun set_current_debug_location2 = LLVMSetCurrentDebugLocation2(builder : BuilderRef, loc : MetadataRef)
{% end %}
fun get_current_debug_location = LLVMGetCurrentDebugLocation(builder : BuilderRef) : ValueRef

Expand Down
4 changes: 4 additions & 0 deletions src/llvm/lib_llvm/debug_info.cr
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,10 @@ lib LibLLVM
builder : DIBuilderRef, scope : MetadataRef, file_scope : MetadataRef, discriminator : UInt
) : MetadataRef

fun di_builder_create_debug_location = LLVMDIBuilderCreateDebugLocation(
ctx : ContextRef, line : UInt, column : UInt, scope : MetadataRef, inlined_at : MetadataRef
) : MetadataRef

fun di_builder_get_or_create_type_array = LLVMDIBuilderGetOrCreateTypeArray(builder : DIBuilderRef, types : MetadataRef*, length : SizeT) : MetadataRef

fun di_builder_create_subroutine_type = LLVMDIBuilderCreateSubroutineType(
Expand Down

0 comments on commit bc1e273

Please sign in to comment.