Enum llvm_plugin_inkwell::module::FlagBehavior
source · [−]pub enum FlagBehavior {
Error,
Warning,
Require,
Override,
Append,
AppendUnique,
}Expand description
Defines the operational behavior for a module wide flag. This documenation comes directly from the LLVM docs
Variants
Error
Emits an error if two values disagree, otherwise the resulting value is that of the operands.
Warning
Emits a warning if two values disagree. The result value will be the operand for the flag from the first module being linked.
Require
Adds a requirement that another module flag be present and have a specified value after linking is performed. The value must be a metadata pair, where the first element of the pair is the ID of the module flag to be restricted, and the second element of the pair is the value the module flag should be restricted to. This behavior can be used to restrict the allowable results (via triggering of an error) of linking IDs with the Override behavior.
Override
Uses the specified value, regardless of the behavior or value of the other module. If both modules specify Override, but the values differ, an error will be emitted.
Append
Appends the two values, which are required to be metadata nodes.
AppendUnique
Appends the two values, which are required to be metadata nodes. However, duplicate entries in the second list are dropped during the append operation.
Trait Implementations
sourceimpl Clone for FlagBehavior
impl Clone for FlagBehavior
sourcefn clone(&self) -> FlagBehavior
fn clone(&self) -> FlagBehavior
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read more
sourceimpl Debug for FlagBehavior
impl Debug for FlagBehavior
sourceimpl From<LLVMModuleFlagBehavior> for FlagBehavior
impl From<LLVMModuleFlagBehavior> for FlagBehavior
sourcefn from(src: LLVMModuleFlagBehavior) -> Self
fn from(src: LLVMModuleFlagBehavior) -> Self
Converts to this type from the input type.
sourceimpl Hash for FlagBehavior
impl Hash for FlagBehavior
sourceimpl Into<LLVMModuleFlagBehavior> for FlagBehavior
impl Into<LLVMModuleFlagBehavior> for FlagBehavior
sourcefn into(self) -> LLVMModuleFlagBehavior
fn into(self) -> LLVMModuleFlagBehavior
Converts this type into the (usually inferred) input type.
sourceimpl Ord for FlagBehavior
impl Ord for FlagBehavior
sourcefn cmp(&self, other: &FlagBehavior) -> Ordering
fn cmp(&self, other: &FlagBehavior) -> Ordering
1.21.0 · sourcefn max(self, other: Self) -> Self
fn max(self, other: Self) -> Self
Compares and returns the maximum of two values. Read more
1.21.0 · sourcefn min(self, other: Self) -> Self
fn min(self, other: Self) -> Self
Compares and returns the minimum of two values. Read more
1.50.0 · sourcefn clamp(self, min: Self, max: Self) -> Selfwhere
Self: PartialOrd<Self>,
fn clamp(self, min: Self, max: Self) -> Selfwhere
Self: PartialOrd<Self>,
Restrict a value to a certain interval. Read more
sourceimpl PartialEq<FlagBehavior> for FlagBehavior
impl PartialEq<FlagBehavior> for FlagBehavior
sourcefn eq(&self, other: &FlagBehavior) -> bool
fn eq(&self, other: &FlagBehavior) -> bool
This method tests for self and other values to be equal, and is used
by ==. Read more
sourceimpl PartialOrd<FlagBehavior> for FlagBehavior
impl PartialOrd<FlagBehavior> for FlagBehavior
sourcefn partial_cmp(&self, other: &FlagBehavior) -> Option<Ordering>
fn partial_cmp(&self, other: &FlagBehavior) -> Option<Ordering>
This method returns an ordering between self and other values if one exists. Read more
1.0.0 · sourcefn lt(&self, other: &Rhs) -> bool
fn lt(&self, other: &Rhs) -> bool
This method tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · sourcefn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for self and other) and is used by the <=
operator. Read more
impl Copy for FlagBehavior
impl Eq for FlagBehavior
impl StructuralEq for FlagBehavior
impl StructuralPartialEq for FlagBehavior
Auto Trait Implementations
impl RefUnwindSafe for FlagBehavior
impl Send for FlagBehavior
impl Sync for FlagBehavior
impl Unpin for FlagBehavior
impl UnwindSafe for FlagBehavior
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more