about summary refs log tree commit diff
path: root/compiler/rustc_codegen_llvm/src/builder.rs
diff options
context:
space:
mode:
authorthe8472 <the8472@users.noreply.github.com>2021-10-12 14:53:13 +0200
committerGitHub <noreply@github.com>2021-10-12 14:53:13 +0200
commit6cdf8030f0f344cf28e350785c77669b777251db (patch)
tree8f331316d06a859e5737eeabb2e7ef23e0ce0c36 /compiler/rustc_codegen_llvm/src/builder.rs
parent17c7635f7c7c8ed7b6e61b5f503ec6f6fb05aa9c (diff)
parentce7713d6b43a6a9263e6d3d2b28056b1d28ee943 (diff)
downloadrust-6cdf8030f0f344cf28e350785c77669b777251db.tar.gz
rust-6cdf8030f0f344cf28e350785c77669b777251db.zip
Rollup merge of #89809 - tmiasko:remap-real-predicate, r=michaelwoerister
Remap ssa RealPredicate to llvm RealPredicate

to avoid relying on the discriminant of the former for FFI purposes
Diffstat (limited to 'compiler/rustc_codegen_llvm/src/builder.rs')
-rw-r--r--compiler/rustc_codegen_llvm/src/builder.rs1
1 files changed, 1 insertions, 0 deletions
diff --git a/compiler/rustc_codegen_llvm/src/builder.rs b/compiler/rustc_codegen_llvm/src/builder.rs
index 9f7b8616d78..d5deacf3811 100644
--- a/compiler/rustc_codegen_llvm/src/builder.rs
+++ b/compiler/rustc_codegen_llvm/src/builder.rs
@@ -828,6 +828,7 @@ impl BuilderMethods<'a, 'tcx> for Builder<'a, 'll, 'tcx> {
     }
 
     fn fcmp(&mut self, op: RealPredicate, lhs: &'ll Value, rhs: &'ll Value) -> &'ll Value {
+        let op = llvm::RealPredicate::from_generic(op);
         unsafe { llvm::LLVMBuildFCmp(self.llbuilder, op as c_uint, lhs, rhs, UNNAMED) }
     }