Class: LLVM::ConstantVector
Class Method Summary
collapse
Instance Method Summary
collapse
Methods inherited from Constant
#bitcast_to, #gep, null, null_ptr, #ptr_to_int, undef
Methods inherited from User
#operands
Methods inherited from Value
#add_attribute, #allocated_type, #constant?, #dump, from_ptr, from_ptr_kind, #global_parent, #kind, #name, #name=, #null?, #remove_attribute, to_ptr, #to_s, type, #type, #undefined?
#==, #eql?, #hash, #to_ptr
Class Method Details
.all_ones ⇒ Object
758
759
760
|
# File 'lib/llvm/core/value.rb', line 758
def self.all_ones
from_ptr(C.const_all_ones(type))
end
|
.const(size_or_values, &block) ⇒ Object
762
763
764
765
|
# File 'lib/llvm/core/value.rb', line 762
def self.const(size_or_values, &block)
vals = LLVM::Support.allocate_pointers(size_or_values, &block)
from_ptr(C.const_vector(vals, vals.size / vals.type_size))
end
|
Instance Method Details
#[](idx) ⇒ Object
771
772
773
|
# File 'lib/llvm/core/value.rb', line 771
def [](idx)
self.class.from_ptr(C.get_aggregate_element(self, idx))
end
|
#size ⇒ Object
767
768
769
|
# File 'lib/llvm/core/value.rb', line 767
def size
C.get_vector_size(type)
end
|