struct

LLVM::Type

Inherits Struct / Value / Object

Constructors

function(arg_types : Array(LLVM::Type), return_type, varargs = false) : self
Source
new(unwrap : LibLLVM::TypeRef)
Source

Instance methods

alignment
Source
array(count) : LLVM::Type
Source
array_size
Source
const_array(values : Array(LLVM::Value)) : Value
Source
const_data_array(buffer : Bytes) : Value
Source
const_double(value : Float64) : Value
Source
const_double(string : String) : Value
Source
const_float(value : Float32) : Value
Source
const_float(value : String) : Value
Source
const_int(value) : Value
Source
context
Source
element_type
Source
inline_asm(asm_string, constraints, has_side_effects = false, is_align_stack = false, can_throw = false, dialect : InlineAsmDialect = InlineAsmDialect::ATT)
Source
inspect(io : IO) : Nil

Appends this struct's name and instance variables names and values to the given IO.

struct Point
  def initialize(@x : Int32, @y : Int32)
  end
end

p1 = Point.new 1, 2
p1.to_s    # "Point(@x=1, @y=2)"
p1.inspect # "Point(@x=1, @y=2)"
Source
int_width
Source
kind
Source
null
Source
null_pointer
Source
packed_struct?
Source
params_size
Source
params_types
Source
pointer(address_space = 0) : LLVM::Type
Source
return_type
Source
size
Source
struct_element_types
Source
struct_name

Assuming this type is a struct, returns its name. The name can be nil if the struct is anonymous. Raises if this type is not a struct.

Source
to_unsafe
Source
undef
Source
unwrap
Source
varargs?
Source
vector(count) : self
Source
vector_size
Source
void?
Source

Nested types