Class: LLVM::LLJit
- Inherits:
-
Object
- Object
- LLVM::LLJit
- Defined in:
- lib/llvm/lljit.rb
Overview
wrapper around LLVMOrcLLJITRef
Defined Under Namespace
Modules: C
Instance Method Summary collapse
- #data_layout ⇒ Object
- #global_prefix ⇒ Object
-
#initialize ⇒ LLJit
constructor
create lljit does not automatically dispose of lljit if lljit was disposed, that would dispose of builder.
- #triple_string ⇒ Object
Constructor Details
#initialize ⇒ LLJit
create lljit does not automatically dispose of lljit if lljit was disposed, that would dispose of builder
12 13 14 15 16 17 18 19 20 21 22 23 |
# File 'lib/llvm/lljit.rb', line 12 def initialize builder = C.create_lljit_builder FFI::MemoryPointer.new(FFI.type_size(:pointer)) do |ptr| error = C.create_lljit(ptr, builder) if error.null? @ptr = ptr.read_pointer else = C.(error) raise end end end |
Instance Method Details
#data_layout ⇒ Object
29 30 31 |
# File 'lib/llvm/lljit.rb', line 29 def data_layout C.get_data_layout_str(ptr) end |
#global_prefix ⇒ Object
33 34 35 36 |
# File 'lib/llvm/lljit.rb', line 33 def global_prefix gp = C.get_global_prefix(ptr) gp.zero? ? "" : gp.chr end |
#triple_string ⇒ Object
25 26 27 |
# File 'lib/llvm/lljit.rb', line 25 def triple_string C.get_triple_string(ptr) end |