pub struct Builder<'a, 'll, 'tcx> {
    pub llbuilder: &'ll mut Builder<'ll>,
    pub cx: &'a CodegenCx<'ll, 'tcx>,
}

Fields

llbuilder: &'ll mut Builder<'ll>cx: &'a CodegenCx<'ll, 'tcx>

Implementations

Methods from Deref<Target = CodegenCx<'ll, 'tcx>>

Generates a new symbol name with the given prefix. This symbol name must only be used for definitions with internal or private linkage.

Looks up debug source information about a BytePos.

Declare a global value.

If there’s a value with the same name already declared, the function will return its Value instead.

Declare a C ABI function.

Only use this for foreign function ABIs and glue. For Rust functions use declare_fn instead.

If there’s a value with the same name already declared, the function will update the declaration and return existing Value instead.

Declare a Rust function.

If there’s a value with the same name already declared, the function will update the declaration and return existing Value instead.

Declare a global with an intention to define it.

Use this function when you intend to define a global. This function will return None if the name already has a definition associated with it. In that case an error should be reported to the user, because it usually happens due to user’s fault (e.g., misuse of #[no_mangle] or #[export_name] attributes).

Declare a private global

Use this function when you intend to define a global without a name.

Gets declared value by name.

Gets defined or externally defined (AvailableExternally linkage) value by name.

Whether a definition or declaration can be assumed to be local to a group of libraries that form a single DSO or executable.

x Creates an integer type with the given number of bits, e.g., i24

Return a LLVM type that has at most the required alignment, and exactly the required size, as a best-effort padding array.

Trait Implementations

Take an inline assembly expression and splat it out via LLVM
Called for Rvalue::Repeat when the elem is neither a ZST nor optimizable using memset.
Called for StorageLive
Called for StorageDead
Returns true if the function source hash was added to the coverage map (even if it had already been added, for this instance). Returns false only if -C instrument-coverage is not enabled (a coverage map is not being generated). Read more
Returns true if the counter was added to the coverage map; false if -C instrument-coverage is not enabled (a coverage map is not being generated). Read more
Returns true if the expression was added to the coverage map; false if -C instrument-coverage is not enabled (a coverage map is not being generated). Read more
Returns true if the region was added to the coverage map; false if -C instrument-coverage is not enabled (a coverage map is not being generated). Read more
The resulting type after dereferencing.
Dereferences the value.
Executes the destructor for this type. Read more
The &FnAbi-wrapping type (or &FnAbi itself), which will be returned from fn_abi_of_* (see also handle_fn_abi_err). Read more
Helper used for fn_abi_of_*, to adapt tcx.fn_abi_of_*(...) into a Self::FnAbiOfResult (which does not need to be a Result<...>). Read more
Remember to add all intrinsics here, in compiler/rustc_typeck/src/check/mod.rs, and in library/core/src/intrinsics.rs; if you need access to any LLVM intrinsics, add them to compiler/rustc_codegen_llvm/src/context.rs. Read more
Trait method used to test whether a given pointer is associated with a type identifier.
Trait method used to load a function while testing if it is associated with a type identifier. Read more
Trait method used to inject va_start on the “spoofed” VaListImpl in Rust defined C-variadic functions. Read more
Trait method used to inject va_end on the “spoofed” VaListImpl before Rust defined C-variadic functions return. Read more
The TyAndLayout-wrapping type (or TyAndLayout itself), which will be returned from layout_of (see also handle_layout_err). Read more
Helper used for layout_of, to adapt tcx.layout_of(...) into a Self::LayoutOfResult (which does not need to be a Result<...>). Read more
Span to use for tcx.at(span), from layout_of.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more
Compute a FnAbi suitable for indirect calls, i.e. to fn pointers. Read more
Compute a FnAbi suitable for declaring/defining an fn instance, and for direct calls to an fn. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Computes the layout of a type. Note that this implicitly executes in “reveal all” mode, and will normalize the input type. Read more
Computes the layout of a type, at span. Note that this implicitly executes in “reveal all” mode, and will normalize the input type. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.

Layout

Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...) attributes. Please see the Rust Reference’s “Type Layout” chapter for details on type layout guarantees.

Size: 16 bytes