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
11 12 13 14 15 16 17 18 19 20 21 22 |
# File 'lib/llvm/lljit.rb', line 11 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
28 29 30 |
# File 'lib/llvm/lljit.rb', line 28 def data_layout C.get_data_layout_str(ptr) end |
#global_prefix ⇒ Object
32 33 34 35 |
# File 'lib/llvm/lljit.rb', line 32 def global_prefix gp = C.get_global_prefix(ptr) gp.zero? ? "" : gp.chr end |
#triple_string ⇒ Object
24 25 26 |
# File 'lib/llvm/lljit.rb', line 24 def triple_string C.get_triple_string(ptr) end |