Class: LLVM::Context
- Inherits:
-
Object
- Object
- LLVM::Context
- Defined in:
- lib/llvm/core/context.rb
Class Method Summary collapse
-
.global ⇒ Object
Obtains a reference to the global Context.
Instance Method Summary collapse
-
#dispose ⇒ Object
Diposes the Context.
-
#initialize(ptr = nil) ⇒ Context
constructor
: (?FFI::Pointer?) -> void.
-
#to_ptr ⇒ Object
: -> FFI::Pointer?.
Constructor Details
#initialize(ptr = nil) ⇒ Context
: (?FFI::Pointer?) -> void
7 8 9 |
# File 'lib/llvm/core/context.rb', line 7 def initialize(ptr = nil) @ptr = ptr || C.context_create() #: FFI::Pointer? end |
Class Method Details
.global ⇒ Object
Obtains a reference to the global Context. : -> Context
19 20 21 |
# File 'lib/llvm/core/context.rb', line 19 def self.global new(C.get_global_context()) end |
Instance Method Details
#dispose ⇒ Object
Diposes the Context. : -> void
25 26 27 28 29 |
# File 'lib/llvm/core/context.rb', line 25 def dispose return if @ptr.nil? C.context_dispose(@ptr) @ptr = nil end |
#to_ptr ⇒ Object
: -> FFI::Pointer?
13 14 15 |
# File 'lib/llvm/core/context.rb', line 13 def to_ptr @ptr end |