Class: LLVM::FunctionType
- Inherits:
-
Type
- Object
- Type
- LLVM::FunctionType
show all
- Defined in:
- lib/llvm/core/type.rb
Instance Method Summary
collapse
Methods inherited from Type
#aggregate?, #align, array, #dump, from_ptr, function, #kind, label, #null, #null_pointer, #pointer, pointer, rec, #size, struct, #to_s, vector, void, x86_amx, x86_mmx
#==, #eql?, #hash, #to_ptr
Instance Method Details
#argument_types ⇒ Object
163
164
165
166
167
168
169
170
171
|
# File 'lib/llvm/core/type.rb', line 163
def argument_types
size = C.count_param_types(self)
result = nil
FFI::MemoryPointer.new(FFI.type_size(:pointer) * size) do |types_ptr|
C.get_param_types(self, types_ptr)
result = types_ptr.read_array_of_pointer(size)
end
result.map { |p| Type.from_ptr(p, nil) }
end
|
#element_type ⇒ Object
159
160
161
|
# File 'lib/llvm/core/type.rb', line 159
def element_type
self
end
|
#vararg? ⇒ Boolean
173
174
175
|
# File 'lib/llvm/core/type.rb', line 173
def vararg?
C.is_function_var_arg(self) != 0
end
|