about summary refs log tree commit diff
path: root/compiler/rustc_codegen_llvm/src/builder.rs
diff options
context:
space:
mode:
authorTomasz Miąsko <tomasz.miasko@gmail.com>2021-10-12 00:00:00 +0000
committerTomasz Miąsko <tomasz.miasko@gmail.com>2021-10-12 11:55:45 +0200
commitce7713d6b43a6a9263e6d3d2b28056b1d28ee943 (patch)
treedfac8791b6870a00f19b48e394794c5161526880 /compiler/rustc_codegen_llvm/src/builder.rs
parentffdf18d1447b57faafded06a887b6dae1f7293c7 (diff)
downloadrust-ce7713d6b43a6a9263e6d3d2b28056b1d28ee943.tar.gz
rust-ce7713d6b43a6a9263e6d3d2b28056b1d28ee943.zip
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) }
     }