Class: LLVM::ExecutionEngine::FunctionCollection
- Inherits:
-
Object
- Object
- LLVM::ExecutionEngine::FunctionCollection
- Defined in:
- lib/llvm/execution_engine.rb
Instance Method Summary collapse
-
#initialize(engine) ⇒ FunctionCollection
constructor
A new instance of FunctionCollection.
- #named(name) ⇒ Function (also: #[])
Constructor Details
#initialize(engine) ⇒ FunctionCollection
Returns a new instance of FunctionCollection.
143 144 145 |
# File 'lib/llvm/execution_engine.rb', line 143 def initialize(engine) @engine = engine end |
Instance Method Details
#named(name) ⇒ Function Also known as: []
149 150 151 152 153 154 155 156 |
# File 'lib/llvm/execution_engine.rb', line 149 def named(name) out_fun = FFI::MemoryPointer.new(:pointer) status = C.find_function(@engine, name.to_s, out_fun) return unless status.zero? Function.from_ptr(out_fun.read_pointer) end |