pub enum Metadata {
String(Vec<u8>),
Value {
ty: TypeId,
value: ValueId,
},
Node(Vec<Option<MetadataId>>),
Distinct(Vec<Option<MetadataId>>),
Debug {
distinct: bool,
node: DebugNode,
},
}Expand description
A metadata record.
Variants§
String(Vec<u8>)
A metadata string, as stored (not checked to be UTF-8 here).
Value
A value as metadata.
Node(Vec<Option<MetadataId>>)
Operands; None is a null operand.
Distinct(Vec<Option<MetadataId>>)
A node of its own, never merged with a node of the same operands (METADATA_DISTINCT_NODE: the loop
identifiers llvm.loop names, whose first operand is the node itself).
Debug
A debug-information node (a program built with -Zi), and whether it is distinct.
Implementations§
Source§impl Metadata
impl Metadata
Sourcepub fn operands(&self) -> Option<&[Option<MetadataId>]>
pub fn operands(&self) -> Option<&[Option<MetadataId>]>
The operands of a node of generic operands, distinct or not; None for a string, a value or a debug node (whose
operands DebugNode::operands gives).
Trait Implementations§
impl StructuralPartialEq for Metadata
Auto Trait Implementations§
impl Forget for Metadata
impl Freeze for Metadata
impl RefUnwindSafe for Metadata
impl Send for Metadata
impl Sync for Metadata
impl Unpin for Metadata
impl UnsafeUnpin for Metadata
impl UnwindSafe for Metadata
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