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.



75
76
77
# File 'lib/llvm/core/module.rb', line 75

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).



80
81
82
# File 'lib/llvm/core/module.rb', line 80

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