Class: LLVM::ConstantVector
Instance Attribute Summary
#ptr
Class Method Summary
collapse
Instance Method Summary
collapse
Methods inherited from Constant
#bitcast_to, #gep, #int_to_ptr, null, null_ptr, poison, #ptr_to_int, undef
Methods inherited from User
#operands
Methods inherited from Value
#add_attribute, #allocated_type, #allocated_type?, #constant?, #dump, from_ptr, from_ptr_kind, #gep_source_element_type, #gep_source_element_type?, #global_parent, #kind, #name, #name=, #null?, #poison?, #remove_attribute, to_ptr, #to_s, type, #type, #undef?
#==, #eql?, #hash, #to_ptr
Class Method Details
.all_ones ⇒ Object
837
838
839
|
# File 'lib/llvm/core/value.rb', line 837
def self.all_ones
from_ptr(C.const_all_ones(type))
end
|
.const(size_or_values) ⇒ Object
841
842
843
844
845
846
847
848
849
|
# File 'lib/llvm/core/value.rb', line 841
def self.const(size_or_values, &)
vals = LLVM::Support.allocate_pointers(size_or_values, &)
raise ArgumentError if vals.size.zero?
from_ptr(C.const_vector(vals, vals.size / vals.type_size))
end
|
Instance Method Details
#[](idx) ⇒ Object
855
856
857
|
# File 'lib/llvm/core/value.rb', line 855
def [](idx)
self.class.from_ptr(C.get_aggregate_element(self, idx))
end
|
#size ⇒ Object
851
852
853
|
# File 'lib/llvm/core/value.rb', line 851
def size
C.get_vector_size(type)
end
|