Enum llvm_bitcode::bitstream::Operand
source · pub enum Operand {
Literal(u64),
Fixed(u8),
Vbr(u8),
Array(Box<Operand>),
Char6,
Blob,
}
Expand description
Abbreviation operand
Variants§
Literal(u64)
A literal value (emitted as a VBR8 field)
Fixed(u8)
A fixed-width field
Vbr(u8)
A VBR-encoded value with the provided chunk width
Array(Box<Operand>)
An array of values. This expects another operand encoded directly after indicating the element type. The array will begin with a vbr6 value indicating the length of the following array.
Char6
A char6-encoded ASCII character
Blob
Emitted as a vbr6 value, padded to a 32-bit boundary and then an array of 8-bit objects
Implementations§
source§impl Operand
impl Operand
sourcepub fn is_payload(&self) -> bool
pub fn is_payload(&self) -> bool
Whether this case is payload
sourcepub fn is_literal(&self) -> bool
pub fn is_literal(&self) -> bool
Whether this case is the literal
case
pub fn is_array(&self) -> bool
pub fn is_blob(&self) -> bool
sourcepub fn encoded_kind(&self) -> u8
pub fn encoded_kind(&self) -> u8
The llvm::BitCodeAbbrevOp::Encoding value this enum case represents.
- note: Must match the encoding in http://llvm.org/docs/BitCodeFormat.html#define-abbrev-encoding
Trait Implementations§
Auto Trait Implementations§
impl RefUnwindSafe for Operand
impl Send for Operand
impl Sync for Operand
impl Unpin for Operand
impl UnwindSafe for Operand
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more