Class: LLVM::FunctionType
- Inherits:
-
Type
- Object
- Type
- LLVM::FunctionType
show all
- Defined in:
- lib/llvm/core/type.rb
Instance Attribute Summary
Attributes inherited from Type
#kind
Instance Method Summary
collapse
Methods inherited from Type
#===, #aggregate?, #align, array, double, #dump, float, from_ptr, function, integer, label, #literal_struct?, named, #null, #null_pointer, opaque_struct, #opaque_struct?, #packed_struct?, #pointer, pointer, #poison, ptr, #size, struct, #to_s, #undef, vector, void, x86_amx, x86_mmx
#==, #eql?, #hash, #to_ptr
Instance Method Details
#argument_types ⇒ Object
318
319
320
321
322
323
324
325
326
|
# File 'lib/llvm/core/type.rb', line 318
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
314
315
316
|
# File 'lib/llvm/core/type.rb', line 314
def element_type
self
end
|
#vararg? ⇒ Boolean
328
329
330
|
# File 'lib/llvm/core/type.rb', line 328
def vararg?
C.is_function_var_arg(self) != 0
end
|