Class: LLVM::ConstantVector
Class Method Summary
collapse
Instance Method Summary
collapse
Methods inherited from Constant
#bitcast_to, #gep, 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
792
793
794
|
# File 'lib/llvm/core/value.rb', line 792
def self.all_ones
from_ptr(C.const_all_ones(type))
end
|
.const(size_or_values, &block) ⇒ Object
796
797
798
799
800
801
802
803
804
|
# File 'lib/llvm/core/value.rb', line 796
def self.const(size_or_values, &block)
vals = LLVM::Support.allocate_pointers(size_or_values, &block)
raise ArgumentError if vals.size.zero?
from_ptr(C.const_vector(vals, vals.size / vals.type_size))
end
|
Instance Method Details
#[](idx) ⇒ Object
810
811
812
|
# File 'lib/llvm/core/value.rb', line 810
def [](idx)
self.class.from_ptr(C.get_aggregate_element(self, idx))
end
|
#size ⇒ Object
806
807
808
|
# File 'lib/llvm/core/value.rb', line 806
def size
C.get_vector_size(type)
end
|