Skip to content

struct LLVM::Type
inherits Struct

Class methods

.function(arg_types : Array(LLVM::Type), return_type, varargs = false) : self

View source

.new(unwrap : LibLLVM::TypeRef)

View source

Methods

#array(count)

View source

#array_size

View source

#const_array(values : Array(LLVM::Value)) : Value

View source

#const_double(string : String) : Value

View source

#const_double(value : Float64) : Value

View source

#const_float(value : String) : Value

View source

#const_float(value : Float32) : Value

View source

#const_int(value) : Value

View source

#context : Context

View source

#element_type

View source

#inline_asm(asm_string, constraints, has_side_effects = false, is_align_stack = false)

View 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)"
View source

#int_width

View source

#kind

View source

#null

View source

#null_pointer

View source

#packed_struct?

View source

#params_size

View source

#params_types

View source

#pointer

View source

#return_type

View source

#size

View source

#struct_element_types

View source

#struct_name : String?

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.

View source

#to_unsafe : LibLLVM::TypeRef

View source

#undef

View source

#unwrap : LibLLVM::TypeRef

View source

#varargs?

View source

#vector(count) : self

View source

#vector_size

View source

#void?

View source