module volt.llvm.common
Backend | LLVM Backend

Common code generation code.

Code Map

//! Common code generation code.
module volt.llvm.common;


//! Returns true if the C calling convention returns structs via
//! arguments.
fn shouldCUseStructRet(target: TargetInfo, irStruct: ir.Struct) bool { }
//! Turns a ArrayType Value into a Pointer Value. Value must be of type
//! ArrayType.
fn getPointerFromArray(state: State, loc: const(Location), result: Value) { }
//! Turns a StaticArrayType Value into a Pointer Value. Value must be of
//! type StaticArrayType.
fn getPointerFromStaticArray(state: State, loc: const(Location), result: Value) { }
//! Turns a StaticArrayType Value into a Array Value. Value must be of type
//! StaticArrayType.
fn getArrayFromStaticArray(state: State, loc: const(Location), result: Value) { }
//! Return the field from a aggregate at the given index.
fn getFieldFromAggregate(state: State, loc: const(Location), left: Value, index: u32, resultType: Type, result: Value) { }
//! Returns a member of aggregate type in value form. Note only value form.
fn getValueFromAggregate(state: State, loc: const(Location), left: Value, index: u32) LLVMValueRef { }
fn makeArrayValue(state: State, loc: Location, at: ArrayType, ptr: LLVMValueRef, len: LLVMValueRef, result: Value) { }
fn makeDelegateValue(state: State, loc: const(Location), dt: DelegateType, voidPtr: LLVMValueRef, funcPtr: LLVMValueRef, result: Value) { }
//! Common handle functions for both inline and constants.
fn handleConstant(state: State, asConst: ir.Constant, result: Value) { }
//! Common handle functions for both inline and constants.
fn handleArrayLiteral(state: State, al: ir.ArrayLiteral, result: Value) { }
//! Common handle functions for both inline and constants.
fn handleStructLiteral(state: State, sl: ir.StructLiteral, result: Value) { }
//! Common handle functions for both inline and constants.
fn handleUnionLiteral(state: State, ul: ir.UnionLiteral, result: Value) { }
//! Common handle functions for both inline and constants.
fn handleClassLiteral(state: State, cl: ir.ClassLiteral, result: Value) { }
fn shouldCUseStructRet(target: TargetInfo, irStruct: ir.Struct) bool

Returns true if the C calling convention returns structs via arguments.

fn getPointerFromArray(state: State, loc: const(Location), result: Value)

Turns a ArrayType Value into a Pointer Value. Value must be of type ArrayType.

fn getPointerFromStaticArray(state: State, loc: const(Location), result: Value)

Turns a StaticArrayType Value into a Pointer Value. Value must be of type StaticArrayType.

fn getArrayFromStaticArray(state: State, loc: const(Location), result: Value)

Turns a StaticArrayType Value into a Array Value. Value must be of type StaticArrayType.

fn getFieldFromAggregate(state: State, loc: const(Location), left: Value, index: u32, resultType: Type, result: Value)

Return the field from a aggregate at the given index.

Sets the type of result to the given type.

fn getValueFromAggregate(state: State, loc: const(Location), left: Value, index: u32) LLVMValueRef

Returns a member of aggregate type in value form. Note only value form.

fn handleConstant(state: State, asConst: ir.Constant, result: Value)

Common handle functions for both inline and constants.

All of the error checking should have been done in other passes and unimplemented features is checked for in the called functions.

fn handleArrayLiteral(state: State, al: ir.ArrayLiteral, result: Value)

Common handle functions for both inline and constants.

All of the error checking should have been done in other passes and unimplemented features is checked for in the called functions.

fn handleStructLiteral(state: State, sl: ir.StructLiteral, result: Value)

Common handle functions for both inline and constants.

All of the error checking should have been done in other passes and unimplemented features is checked for in the called functions.

fn handleUnionLiteral(state: State, ul: ir.UnionLiteral, result: Value)

Common handle functions for both inline and constants.

All of the error checking should have been done in other passes and unimplemented features is checked for in the called functions.

fn handleClassLiteral(state: State, cl: ir.ClassLiteral, result: Value)

Common handle functions for both inline and constants.

All of the error checking should have been done in other passes and unimplemented features is checked for in the called functions.