@@ -223,6 +223,33 @@ pub enum RealPredicate {
223
223
RealPredicateTrue = 15,
224
224
}
225
225
226
+ impl RealPredicate {
227
+ pub fn from_generic(realp: rustc_codegen_ssa::common::RealPredicate) -> Self {
228
+ match realp {
229
+ rustc_codegen_ssa::common::RealPredicate::RealPredicateFalse => {
230
+ RealPredicate::RealPredicateFalse
231
+ }
232
+ rustc_codegen_ssa::common::RealPredicate::RealOEQ => RealPredicate::RealOEQ,
233
+ rustc_codegen_ssa::common::RealPredicate::RealOGT => RealPredicate::RealOGT,
234
+ rustc_codegen_ssa::common::RealPredicate::RealOGE => RealPredicate::RealOGE,
235
+ rustc_codegen_ssa::common::RealPredicate::RealOLT => RealPredicate::RealOLT,
236
+ rustc_codegen_ssa::common::RealPredicate::RealOLE => RealPredicate::RealOLE,
237
+ rustc_codegen_ssa::common::RealPredicate::RealONE => RealPredicate::RealONE,
238
+ rustc_codegen_ssa::common::RealPredicate::RealORD => RealPredicate::RealORD,
239
+ rustc_codegen_ssa::common::RealPredicate::RealUNO => RealPredicate::RealUNO,
240
+ rustc_codegen_ssa::common::RealPredicate::RealUEQ => RealPredicate::RealUEQ,
241
+ rustc_codegen_ssa::common::RealPredicate::RealUGT => RealPredicate::RealUGT,
242
+ rustc_codegen_ssa::common::RealPredicate::RealUGE => RealPredicate::RealUGE,
243
+ rustc_codegen_ssa::common::RealPredicate::RealULT => RealPredicate::RealULT,
244
+ rustc_codegen_ssa::common::RealPredicate::RealULE => RealPredicate::RealULE,
245
+ rustc_codegen_ssa::common::RealPredicate::RealUNE => RealPredicate::RealUNE,
246
+ rustc_codegen_ssa::common::RealPredicate::RealPredicateTrue => {
247
+ RealPredicate::RealPredicateTrue
248
+ }
249
+ }
250
+ }
251
+ }
252
+
226
253
/// LLVMTypeKind
227
254
#[derive(Copy, Clone, PartialEq, Debug)]
228
255
#[repr(C)]
0 commit comments