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
#align, array, #dump, #element_type, from_ptr, function, #kind, #null, #null_pointer, #pointer, pointer, rec, #size, struct, vector, void
#==, #eql?, #hash, #to_ptr
Instance Method Details
#argument_types ⇒ Object
124
125
126
127
128
129
130
131
132
|
# File 'lib/llvm/core/type.rb', line 124
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
|
#vararg? ⇒ Boolean
134
135
136
|
# File 'lib/llvm/core/type.rb', line 134
def vararg?
C.is_function_var_arg(self) != 0
end
|