diff options
| author | Tomasz Miąsko <tomasz.miasko@gmail.com> | 2021-10-12 00:00:00 +0000 |
|---|---|---|
| committer | Tomasz Miąsko <tomasz.miasko@gmail.com> | 2021-10-12 11:55:45 +0200 |
| commit | ce7713d6b43a6a9263e6d3d2b28056b1d28ee943 (patch) | |
| tree | dfac8791b6870a00f19b48e394794c5161526880 /compiler/rustc_codegen_llvm/src/builder.rs | |
| parent | ffdf18d1447b57faafded06a887b6dae1f7293c7 (diff) | |
| download | rust-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.rs | 1 |
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) } } |
