IntSLE = 41,
}
-impl traits::IntPredicateMethods for IntPredicate {
- fn convert_to_backend_specific(intpre: traits::IntPredicate) -> Self {
+impl IntPredicate {
+ pub fn from_generic(intpre: traits::IntPredicate) -> Self {
match intpre {
traits::IntPredicate::IntEQ => IntPredicate::IntEQ,
traits::IntPredicate::IntNE => IntPredicate::IntNE,
RealPredicateTrue = 15,
}
+impl RealPredicate {
+ pub fn from_generic(realpred: traits::RealPredicate) -> Self {
+ match realpred {
+ traits::RealPredicate::RealPredicateFalse => RealPredicate::RealPredicateFalse,
+ traits::RealPredicate::RealOEQ => RealPredicate::RealOEQ,
+ traits::RealPredicate::RealOGT => RealPredicate::RealOGT,
+ traits::RealPredicate::RealOGE => RealPredicate::RealOGE,
+ traits::RealPredicate::RealOLT => RealPredicate::RealOLT,
+ traits::RealPredicate::RealOLE => RealPredicate::RealOLE,
+ traits::RealPredicate::RealONE => RealPredicate::RealONE,
+ traits::RealPredicate::RealORD => RealPredicate::RealORD,
+ traits::RealPredicate::RealUNO => RealPredicate::RealUNO,
+ traits::RealPredicate::RealUEQ => RealPredicate::RealUEQ,
+ traits::RealPredicate::RealUGT => RealPredicate::RealUGT,
+ traits::RealPredicate::RealUGE => RealPredicate::RealUGE,
+ traits::RealPredicate::RealULT => RealPredicate::RealULT,
+ traits::RealPredicate::RealULE => RealPredicate::RealULE,
+ traits::RealPredicate::RealUNE => RealPredicate::RealUNE,
+ traits::RealPredicate::RealPredicateTrue => RealPredicate::RealPredicateTrue
+ }
+ }
+}
+
/// LLVMTypeKind
#[derive(Copy, Clone, PartialEq, Debug)]
#[repr(C)]
AtomicUMin = 10,
}
+impl AtomicRmwBinOp {
+ pub fn from_generic(op : traits::AtomicRmwBinOp) -> Self {
+ match op {
+ traits::AtomicRmwBinOp::AtomicXchg => AtomicRmwBinOp::AtomicXchg,
+ traits::AtomicRmwBinOp::AtomicAdd => AtomicRmwBinOp::AtomicAdd,
+ traits::AtomicRmwBinOp::AtomicSub => AtomicRmwBinOp::AtomicSub,
+ traits::AtomicRmwBinOp::AtomicAnd => AtomicRmwBinOp::AtomicAnd,
+ traits::AtomicRmwBinOp::AtomicNand => AtomicRmwBinOp::AtomicNand,
+ traits::AtomicRmwBinOp::AtomicOr => AtomicRmwBinOp::AtomicOr,
+ traits::AtomicRmwBinOp::AtomicXor => AtomicRmwBinOp::AtomicXor,
+ traits::AtomicRmwBinOp::AtomicMax => AtomicRmwBinOp::AtomicMax,
+ traits::AtomicRmwBinOp::AtomicMin => AtomicRmwBinOp::AtomicMin,
+ traits::AtomicRmwBinOp::AtomicUMax => AtomicRmwBinOp::AtomicUMax,
+ traits::AtomicRmwBinOp::AtomicUMin => AtomicRmwBinOp::AtomicUMin
+ }
+ }
+}
+
/// LLVMAtomicOrdering
#[derive(Copy, Clone)]
#[repr(C)]
SequentiallyConsistent = 7,
}
+impl AtomicOrdering {
+ pub fn from_generic(ao : traits::AtomicOrdering) -> Self {
+ match ao {
+ traits::AtomicOrdering::NotAtomic => AtomicOrdering::NotAtomic,
+ traits::AtomicOrdering::Unordered => AtomicOrdering::Unordered,
+ traits::AtomicOrdering::Monotonic => AtomicOrdering::Monotonic,
+ traits::AtomicOrdering::Acquire => AtomicOrdering::Acquire,
+ traits::AtomicOrdering::Release => AtomicOrdering::Release,
+ traits::AtomicOrdering::AcquireRelease => AtomicOrdering::AcquireRelease,
+ traits::AtomicOrdering::SequentiallyConsistent =>
+ AtomicOrdering::SequentiallyConsistent
+ }
+ }
+}
+
+
/// LLVMRustSynchronizationScope
#[derive(Copy, Clone)]
#[repr(C)]
CrossThread,
}
+impl SynchronizationScope {
+ pub fn from_generic(sc : traits::SynchronizationScope) -> Self {
+ match sc {
+ traits::SynchronizationScope::Other => SynchronizationScope::Other,
+ traits::SynchronizationScope::SingleThread => SynchronizationScope::SingleThread,
+ traits::SynchronizationScope::CrossThread => SynchronizationScope::CrossThread,
+ }
+ }
+}
+
/// LLVMRustFileType
#[derive(Copy, Clone)]
#[repr(C)]