Class: LLVM::ConstantVector

Inherits:
Constant show all
Defined in:
lib/llvm/core/value.rb

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, #constant?, #dump, from_ptr, #name, #name=, #null?, #remove_attribute, to_ptr, #type, type, #undefined?

Methods included from PointerIdentity

#==, #eql?, #hash, #to_ptr

Class Method Details

.all_onesObject



621
622
623
# File 'lib/llvm/core/value.rb', line 621

def self.all_ones
  from_ptr(C.const_all_ones(type))
end

.const(size_or_values, &block) ⇒ Object



625
626
627
628
# File 'lib/llvm/core/value.rb', line 625

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

#sizeObject



630
631
632
# File 'lib/llvm/core/value.rb', line 630

def size
  C.get_vector_size(type)
end