Class: LLVM::Module::TypeCollection

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

Instance Method Summary collapse

Constructor Details

#initialize(mod) ⇒ TypeCollection

Returns a new instance of TypeCollection.



59
60
61
# File 'lib/llvm/core/module.rb', line 59

def initialize(mod)
  @module = mod
end

Instance Method Details

#named(name) ⇒ Object Also known as: []

Returns the Type with the given name (symbol or string).



64
65
66
# File 'lib/llvm/core/module.rb', line 64

def named(name)
  Type.from_ptr(C.get_type_by_name(@module, name.to_s), nil)
end