Class: LLVM::ConstantVector

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

Class Method Summary collapse

Methods inherited from Constant

#bitcast_to, #gep, null, null_ptr, undef

Methods inherited from User

#operands

Methods inherited from Value

#==, #add_attribute, #constant?, #dump, #eql?, from_ptr, #hash, #name, #name=, #null?, to_ptr, #to_ptr, type, #type, #undefined?

Class Method Details

.all_onesObject



520
521
522
# File 'lib/llvm/core/value.rb', line 520

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

.const(size_or_values, &block) ⇒ Object



524
525
526
527
# File 'lib/llvm/core/value.rb', line 524

def self.const(size_or_values, &block)
  vals = LLVM::Support.allocate_pointers(size_or_values, &block)
  from_ptr(C.LLVMConstVector(vals, vals.size / vals.type_size))
end