FunctionCode

Enum FunctionCode 

Source
#[non_exhaustive]
#[repr(u8)]
pub enum FunctionCode {
Show 56 variants DeclareBlocks = 1, BinOp = 2, Cast = 3, GepOld = 4, SelectOld = 5, ExtractElt = 6, InsertElt = 7, ShuffleVec = 8, Cmp = 9, Ret = 10, Br = 11, Switch = 12, Invoke = 13, Unreachable = 15, Phi = 16, Alloca = 19, Load = 20, VaArg = 23, StoreOld = 24, ExtractVal = 26, InsertVal = 27, Cmp2 = 28, Vselect = 29, InboundsGepOld = 30, IndirectBr = 31, DebugLocAgain = 33, Call = 34, DebugLoc = 35, Fence = 36, CmpxchgOld = 37, AtomicRmwOld = 38, Resume = 39, LandingPadOld = 40, LoadAtomic = 41, StoreAtomicOld = 42, Gep = 43, Store = 44, StoreAtomic = 45, Cmpxchg = 46, LandingPad = 47, CleanupRet = 48, CatchRet = 49, CatchPad = 50, CleanupPad = 51, CatchSwitch = 52, OperandBundle = 55, UnOp = 56, CallBr = 57, Freeze = 58, AtomicRmw = 59, BlockaddrUsers = 60, DebugRecordValue = 61, DebugRecordDeclare = 62, DebugRecordAssign = 63, DebugRecordValueSimple = 64, DebugRecordLabel = 65,
}

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.
§

DeclareBlocks = 1

DECLAREBLOCKS

[n]

§

BinOp = 2

BINOP

[opcode, ty, opval, opval]

§

Cast = 3

CAST

[opcode, ty, opty, opval]

§

GepOld = 4

Old GEP instruction record; superseded by FUNC_CODE_INST_GEP

GEP

[n x operands]

§

SelectOld = 5

Unused.

SELECT

[ty, opval, opval, opval]

§

ExtractElt = 6

EXTRACTELT

[opty, opval, opval]

§

InsertElt = 7

INSERTELT

[ty, opval, opval, opval]

§

ShuffleVec = 8

SHUFFLEVEC

[ty, opval, opval, opval]

§

Cmp = 9

CMP

[opty, opval, opval, pred]

§

Ret = 10

RET

[opty, pval]

§

Br = 11

BR

[bb#, bb#, cond] or [bb#]

§

Switch = 12

SWITCH

[opty, op0, op1, …]

§

Invoke = 13

INVOKE

[attr, fnty, op0, op1, …]

§

Unreachable = 15

UNREACHABLE

§

Phi = 16

PHI

[ty, val0, b0, …]

§

Alloca = 19

ALLOCA

[instty, opty, op, align]

§

Load = 20

LOAD

[opty, op, align, vol]

§

VaArg = 23

VAARG

[valistty, valist, instty]

§

StoreOld = 24

Obsolete store record; replaced by FUNC_CODE_INST_STORE

STORE

[ptrty, tr, al, align, vol]

§

ExtractVal = 26

EXTRACTVAL

[n x operands]

§

InsertVal = 27

INSERTVAL

[n x operands]

§

Cmp2 = 28

CMP2

fcmp/icmp returning Int1TY or vector of Int1Ty. Same as CMP, exists to support legacy vicmp/vfcmp instructions.

[opty, opval, opval, pred]

§

Vselect = 29

VSELECT

new select on i1 or [N x i1]

[ty, pval, pval, redty, red]

§

InboundsGepOld = 30

Obsolete inbounds GEP record; replaced by the newer FUNC_CODE_INST_GEP

INBOUNDS_GEP

[n x operands]

§

IndirectBr = 31

INDIRECTBR

[opty, op0, op1, …]

§

DebugLocAgain = 33

DEBUG_LOC_AGAIN

§

Call = 34

CALL

[attr, cc, fnty, fnid, args…]

§

DebugLoc = 35

DEBUG_LOC

[Line, ol, copeVal, IAVal]

§

Fence = 36

FENCE

[ordering, synchscope]

§

CmpxchgOld = 37

Old cmpxchg record; replaced by FUNC_CODE_INST_CMPXCHG

CMPXCHG

[ptrty, ptr, cmp, val, vol, ordering, synchscope, failure_ordering?, weak?]

§

AtomicRmwOld = 38

Obsolete atomicrmw record; replaced by FUNC_CODE_INST_ATOMICRMW

ATOMICRMW

[ptrty, tr, al, operation, align, vol, ordering, synchscope]

§

Resume = 39

RESUME

[opval]

§

LandingPadOld = 40

Obsolete landingpad record; replaced by FUNC_CODE_INST_LANDINGPAD

LANDINGPAD

[ty, al, al, um, d0, al0…]

§

LoadAtomic = 41

LOAD

[opty, op, align, vol, ordering, synchscope]

§

StoreAtomicOld = 42

Obsolete store-atomic record; replaced by FUNC_CODE_INST_STOREATOMIC

STORE

[ptrty, tr, al, align, vol ordering, synchscope]

§

Gep = 43

GEP

[inbounds, n x operands]

§

Store = 44

STORE

[ptrty, tr, alty, al, align, vol]

§

StoreAtomic = 45

STORE

[ptrty, tr, al, align, vol]

§

Cmpxchg = 46

CMPXCHG

[ptrty, ptr, cmp, val, vol, success_ordering, synchscope, failure_ordering, weak]

§

LandingPad = 47

LANDINGPAD

[ty, al, um, d0, al0…]

§

CleanupRet = 48

CLEANUPRET

[val] or [val, b#]

§

CatchRet = 49

CATCHRET

[val, b#]

§

CatchPad = 50

CATCHPAD

[bb#, b#, um, rgs…]

§

CleanupPad = 51

CLEANUPPAD

[num, rgs…]

§

CatchSwitch = 52

CATCHSWITCH

[num, rgs…] or [num, rgs…, b]

§

OperandBundle = 55

OPERAND_BUNDLE

[tag#, value…]

§

UnOp = 56

UNOP

[opcode, ty, opval]

§

CallBr = 57

CALLBR

[attr, cc, norm, transfs, fnty, fnid, args…]

§

Freeze = 58

FREEZE

[opty, opval]

§

AtomicRmw = 59

ATOMICRMW

[ptrty, ptr, valty, val, operation, align, vol, ordering, synchscope]

§

BlockaddrUsers = 60

BLOCKADDR_USERS

[value…]

§

DebugRecordValue = 61

[DILocation, DILocalVariable, DIExpression, ValueAsMetadata]

§

DebugRecordDeclare = 62

[DILocation, DILocalVariable, DIExpression, ValueAsMetadata]

§

DebugRecordAssign = 63

[DILocation, DILocalVariable, DIExpression, ValueAsMetadata, DIAssignID, DIExpression (addr), ValueAsMetadata (addr)]

§

DebugRecordValueSimple = 64

[DILocation, DILocalVariable, DIExpression, Value]

§

DebugRecordLabel = 65

[DILocation, DILabel]

Trait Implementations§

Source§

impl Clone for FunctionCode

Source§

fn clone(&self) -> FunctionCode

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 FunctionCode

Source§

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

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

impl PartialEq for FunctionCode

Source§

fn eq(&self, other: &FunctionCode) -> 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 FunctionCode

Source§

type Error = TryFromPrimitiveError<FunctionCode>

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 FunctionCode

Source§

impl Copy for FunctionCode

Source§

impl StructuralPartialEq for FunctionCode

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.