Module traits

Source
Expand description

Interface of a Rust codegen backend

This crate defines all the traits that have to be implemented by a codegen backend in order to use the backend-agnostic codegen code in rustc_codegen_ssa.

The interface is designed around two backend-specific data structures, the codegen context and the builder. The codegen context is supposed to be read-only after its creation and during the actual codegen, while the builder stores the information about the function during codegen and is used to produce the instructions of the backend IR.

The traits contain associated types that are backend-specific, such as the backend’s value or basic blocks.

ModulesΒ§

abi πŸ”’
asm πŸ”’
backend πŸ”’
builder πŸ”’
consts πŸ”’
coverageinfo πŸ”’
debuginfo πŸ”’
declare πŸ”’
intrinsic πŸ”’
misc πŸ”’
statics πŸ”’
type_ πŸ”’
write πŸ”’

EnumsΒ§

GlobalAsmOperandRef
InlineAsmOperandRef
OverflowOp

TraitsΒ§

AbiBuilderMethods
ArgAbiBuilderMethods
AsmBuilderMethods
AsmCodegenMethods
BackendTypes
BaseTypeCodegenMethods
BuilderMethods
CodegenBackend
ConstCodegenMethods
CoverageInfoBuilderMethods
DebugInfoBuilderMethods
DebugInfoCodegenMethods
DerivedTypeCodegenMethods
ExtraBackendMethods
IntrinsicCallBuilderMethods
LayoutTypeCodegenMethods
MiscCodegenMethods
ModuleBufferMethods
PreDefineCodegenMethods
StaticBuilderMethods
StaticCodegenMethods
ThinBufferMethods
TypeMembershipCodegenMethods
WriteBackendMethods

Trait AliasesΒ§

CodegenMethods
CodegenObject
TypeCodegenMethods