Class: LLVM::ConstantStruct
- Defined in:
- lib/llvm/core/value.rb
Class Method Summary collapse
-
.const(size_or_values, packed = false, &block) ⇒ Object
ConstantStruct.const(size) {|i| … } or ConstantStruct.const().
- .named_const(type, size_or_values, &block) ⇒ Object
Methods inherited from Constant
#bitcast_to, #gep, null, null_ptr, #ptr_to_int, undef
Methods inherited from User
Methods inherited from Value
#add_attribute, #constant?, #dump, from_ptr, #name, #name=, #null?, to_ptr, #type, type, #undefined?
Methods included from PointerIdentity
Class Method Details
.const(size_or_values, packed = false, &block) ⇒ Object
ConstantStruct.const(size) {|i| … } or ConstantStruct.const()
570 571 572 573 |
# File 'lib/llvm/core/value.rb', line 570 def self.const(size_or_values, packed = false, &block) vals = LLVM::Support.allocate_pointers(size_or_values, &block) from_ptr C.const_struct(vals, vals.size / vals.type_size, packed ? 1 : 0) end |
.named_const(type, size_or_values, &block) ⇒ Object
575 576 577 578 |
# File 'lib/llvm/core/value.rb', line 575 def self.named_const(type, size_or_values, &block) vals = LLVM::Support.allocate_pointers(size_or_values, &block) from_ptr C.const_named_struct(type, vals, vals.size / vals.type_size) end |