pub enum MdNodeAttr {
Tuple {
distinct: bool,
operands: Vec<MdOperandAttr>,
},
}Expand description
A metadata node: an entry in the module’s metadata table (MdTableAttr).
TODO: Only LLVM’s generic MDTuple is modelled. Typed support for LLVM’s
specialized debug info nodes would be added as further variants of this enum,
holding the scalar fields that those nodes keep outside their operand list.
Variants§
Tuple
LLVM’s MDTuple: !{ op, op, ... }, or distinct !{ op, op, ... } for a node
that LLVM must not unique with a structurally identical one.
Implementations§
Source§impl MdNodeAttr
impl MdNodeAttr
Sourcepub fn new_tuple(operands: Vec<MdOperandAttr>) -> Self
pub fn new_tuple(operands: Vec<MdOperandAttr>) -> Self
A uniqued MDTuple with the given operands.
Sourcepub fn new_distinct_tuple(operands: Vec<MdOperandAttr>) -> Self
pub fn new_distinct_tuple(operands: Vec<MdOperandAttr>) -> Self
A distinct MDTuple with the given operands.
Sourcepub fn is_distinct(&self) -> bool
pub fn is_distinct(&self) -> bool
Is this a distinct node?
Sourcepub fn operands(&self) -> &[MdOperandAttr]
pub fn operands(&self) -> &[MdOperandAttr]
This node’s operands.
Trait Implementations§
Source§impl Clone for MdNodeAttr
impl Clone for MdNodeAttr
Source§fn clone(&self) -> MdNodeAttr
fn clone(&self) -> MdNodeAttr
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for MdNodeAttr
impl Debug for MdNodeAttr
impl Eq for MdNodeAttr
Source§impl Hash for MdNodeAttr
impl Hash for MdNodeAttr
Source§impl Parsable for MdNodeAttr
impl Parsable for MdNodeAttr
Source§type Parsed = MdNodeAttr
type Parsed = MdNodeAttr
The type of the parsed entity.
Source§fn parse<'a>(
state_stream: &mut StateStream<'a>,
_arg: Self::Arg,
) -> ParseResult<'a, Self::Parsed>
fn parse<'a>( state_stream: &mut StateStream<'a>, _arg: Self::Arg, ) -> ParseResult<'a, Self::Parsed>
Define a parser using existing combinators and call
into on [Parser::parse_stream] to get the final [ParseResult].
Use state_stream.state as necessary.Source§impl PartialEq for MdNodeAttr
impl PartialEq for MdNodeAttr
Source§fn eq(&self, other: &MdNodeAttr) -> bool
fn eq(&self, other: &MdNodeAttr) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Printable for MdNodeAttr
impl Printable for MdNodeAttr
impl StructuralPartialEq for MdNodeAttr
Auto Trait Implementations§
impl !RefUnwindSafe for MdNodeAttr
impl !UnwindSafe for MdNodeAttr
impl Freeze for MdNodeAttr
impl Send for MdNodeAttr
impl Sync for MdNodeAttr
impl Unpin for MdNodeAttr
impl UnsafeUnpin for MdNodeAttr
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Converts
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>, which can then be
downcast into Box<dyn ConcreteType> where ConcreteType implements Trait.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Converts
Rc<Trait> (where Trait: Downcast) to Rc<Any>, which can then be further
downcast into Rc<ConcreteType> where ConcreteType implements Trait.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Converts
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Converts
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.§impl<T> DowncastSend for T
impl<T> DowncastSend for T
§impl<T> DowncastSync for T
impl<T> DowncastSync for T
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.