Class: LLVM::ConstantStruct
- Defined in:
- lib/llvm/core/value.rb
Instance Attribute Summary
Attributes included from PointerIdentity
Class Method Summary collapse
-
.const(size_or_values, packed = false) ⇒ Object
ConstantStruct.const(size) {|i| … } or ConstantStruct.const().
- .named_const(type, size_or_values) ⇒ Object
Instance Method Summary collapse
Methods inherited from Constant
#bitcast_to, #gep, #int_to_ptr, null, null_ptr, poison, #ptr_to_int, undef
Methods inherited from User
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?
Methods included from PointerIdentity
Class Method Details
.const(size_or_values, packed = false) ⇒ Object
ConstantStruct.const(size) {|i| … } or ConstantStruct.const()
821 822 823 824 |
# File 'lib/llvm/core/value.rb', line 821 def self.const(size_or_values, packed = false, &) vals = LLVM::Support.allocate_pointers(size_or_values, &) from_ptr C.const_struct(vals, vals.size / vals.type_size, packed ? 1 : 0) end |
.named_const(type, size_or_values) ⇒ Object
826 827 828 829 |
# File 'lib/llvm/core/value.rb', line 826 def self.named_const(type, size_or_values, &) vals = LLVM::Support.allocate_pointers(size_or_values, &) from_ptr C.const_named_struct(type, vals, vals.size / vals.type_size) end |
Instance Method Details
#[](idx) ⇒ Object
831 832 833 |
# File 'lib/llvm/core/value.rb', line 831 def [](idx) Value.from_ptr_kind(C.get_aggregate_element(self, idx)) end |