Skip to content

Commit

Permalink
Revert "Query runtime version of LLVM"
Browse files Browse the repository at this point in the history
This reverts commit c43bac2.
  • Loading branch information
straight-shoota committed Jan 18, 2025
1 parent c43bac2 commit ca4958b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 15 deletions.
13 changes: 2 additions & 11 deletions src/llvm.cr
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,9 @@ require "c/string"
module LLVM
@@initialized = false

# Returns the runtime version of LLVM.
#
# NOTE: Prior to LLVM 16.0 this method returns the compile time version, i.e.
# which as linked against. It might be different from the actually loaded
# version at runtime.
# Returns the version of LLVM.
def self.version
{% if LibLLVM.has_method?(:get_version) %}
LibLLVM.get_version(out major, out minor, out patch)
"#{major}.#{minor}.#{patch}"
{% else %}
LibLLVM::VERSION
{% end %}
LibLLVM::VERSION
end

def self.init_x86 : Nil
Expand Down
4 changes: 0 additions & 4 deletions src/llvm/lib_llvm/core.cr
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,6 @@ lib LibLLVM

fun dispose_message = LLVMDisposeMessage(message : Char*)

{% unless LibLLVM::IS_LT_160 %}
fun get_version = LLVMGetVersion(major : UInt*, minor : UInt*, patch : UInt*) : Void
{% end %}

fun create_context = LLVMContextCreate : ContextRef
fun dispose_context = LLVMContextDispose(c : ContextRef)

Expand Down

0 comments on commit ca4958b

Please sign in to comment.