Class: LLVM::Context

Inherits:
Object
  • Object
show all
Defined in:
lib/llvm/core/context.rb

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeContext

Returns a new instance of Context.



3
4
5
# File 'lib/llvm/core/context.rb', line 3

def initialize
  @ptr = C.LLVMContextCreate()
end

Class Method Details

.globalObject

Obtains a reference to the global Context.



13
14
15
# File 'lib/llvm/core/context.rb', line 13

def self.global
  new(C.LLVMGetGlobalContext())
end

Instance Method Details

#disposeObject

Diposes the Context.



18
19
20
# File 'lib/llvm/core/context.rb', line 18

def dispose
  C.LLVMContextDispose(@ptr)
end

#to_ptrObject



8
9
10
# File 'lib/llvm/core/context.rb', line 8

def to_ptr
  @ptr
end