ConstantsCodes

Enum ConstantsCodes 

Source
#[non_exhaustive]
#[repr(u8)]
pub enum ConstantsCodes {
Show 33 variants Settype = 1, Null = 2, Undef = 3, Integer = 4, WideInteger = 5, Float = 6, Aggregate = 7, String = 8, CString = 9, BinOp = 10, Cast = 11, GepOld = 12, Select = 13, ExtractElt = 14, InsertElt = 15, ShuffleVec = 16, Cmp = 17, InlineasmOld = 18, ShufVecEx = 19, InboundsGep = 20, BlockAddress = 21, Data = 22, InlineAsmOld2 = 23, GepWithInrangeIndexOld = 24, UnOp = 25, Poison = 26, DsoLocalEquivalent = 27, InlineAsmOld3 = 28, NoCfiValue = 29, InlineAsm = 30, GepWithInrange = 31, Gep = 32, PtrAuth = 33,
}
Expand description

The constants block (CONSTANTS_BLOCK_ID describes emission for each constant and maintains an implicit current type value.

Variants (Non-exhaustive)§

This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
§

Settype = 1

SETTYPE

The initial implicit type is i32

[typeid]

§

Null = 2

NULL

§

Undef = 3

UNDEF

§

Integer = 4

INTEGER

[intval]

§

WideInteger = 5

WIDE_INTEGER

[n x intval]

§

Float = 6

FLOAT

[fpval]

§

Aggregate = 7

AGGREGATE

[n x value number]

§

String = 8

STRING

[values]

§

CString = 9

CSTRING

[values]

§

BinOp = 10

CE_BINOP

[opcode, opval, opval]

§

Cast = 11

CE_CAST

[opcode, opty, opval]

§

GepOld = 12

Obsolete “constant expression” GEP record; replaced by CST_CODE_CE_GEP

CE_GEP

[n x operands]

§

Select = 13

Unused

CE_SELECT

[opval, opval, opval]

§

ExtractElt = 14

CE_EXTRACTELT

[opty, opval, opval]

§

InsertElt = 15

CE_INSERTELT

[opval, opval, opval]

§

ShuffleVec = 16

CE_SHUFFLEVEC

[opval, opval, opval]

§

Cmp = 17

Unused.

CE_CMP

[opty, opval, opval, pred]

§

InlineasmOld = 18

Obsolete inline asm record variant

INLINEASM

[sideeffect|alignstack, asmstr, onststr]

§

ShufVecEx = 19

SHUFVEC_EX

[opty, opval, opval, opval]

§

InboundsGep = 20

Obsolete.

INBOUNDS_GEP

[n x operands]

§

BlockAddress = 21

BLOCKADDRESS

[fnty, fnval, bb#]

§

Data = 22

DATA

[n x elements]

§

InlineAsmOld2 = 23

Obsolete inline asm encoding variant

INLINEASM

[sideeffect|alignstack|asmdialect, smstr, onststr]

§

GepWithInrangeIndexOld = 24

[opty, flags, n x operands]

§

UnOp = 25

CST_CODE_CE_UNOP

[opcode, opval]

§

Poison = 26

POISON

§

DsoLocalEquivalent = 27

DSO_LOCAL_EQUIVALENT

[gvty, gv]

§

InlineAsmOld3 = 28

Obsolete variant for inline asm

INLINEASM

[sideeffect|alignstack|asmdialect|unwind, asmstr, onststr]

§

NoCfiValue = 29

NO_CFI

[fty, f]

§

InlineAsm = 30

INLINEASM

[fnty, sideeffect|alignstack|asmdialect|unwind, asmstr, onststr]

§

GepWithInrange = 31

CST_CODE_CE_GEP_WITH_INRANGE [opty, flags, range, n x operands]

§

Gep = 32

CST_CODE_CE_GEP [opty, flags, n x operands]

§

PtrAuth = 33

CST_CODE_PTRAUTH [ptr, key, disc, addrdisc]

Trait Implementations§

Source§

impl Clone for ConstantsCodes

Source§

fn clone(&self) -> ConstantsCodes

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for ConstantsCodes

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl PartialEq for ConstantsCodes

Source§

fn eq(&self, other: &ConstantsCodes) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl TryFrom<u8> for ConstantsCodes

Source§

type Error = TryFromPrimitiveError<ConstantsCodes>

The type returned in the event of a conversion error.
Source§

fn try_from(number: u8) -> Result<Self, TryFromPrimitiveError<Self>>

Performs the conversion.
Source§

impl TryFromPrimitive for ConstantsCodes

Source§

impl Copy for ConstantsCodes

Source§

impl StructuralPartialEq for ConstantsCodes

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

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

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.