From f40932f106d3670a4b2041d54bf37fa3f49c20f2 Mon Sep 17 00:00:00 2001 From: varkor Date: Tue, 16 Oct 2018 18:19:04 +0100 Subject: [PATCH] Fix LLVMRustInlineAsmVerify return type mismatch --- src/librustc_codegen_llvm/builder.rs | 2 +- src/librustc_codegen_llvm/llvm/ffi.rs | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/librustc_codegen_llvm/builder.rs b/src/librustc_codegen_llvm/builder.rs index df9c4e874bd..169bd9a8466 100644 --- a/src/librustc_codegen_llvm/builder.rs +++ b/src/librustc_codegen_llvm/builder.rs @@ -756,7 +756,7 @@ impl Builder<'a, 'll, 'tcx> { // Ask LLVM to verify that the constraints are well-formed. let constraints_ok = llvm::LLVMRustInlineAsmVerify(fty, cons); debug!("Constraint verification result: {:?}", constraints_ok); - if constraints_ok == llvm::True { + if constraints_ok { let v = llvm::LLVMRustInlineAsm( fty, asm, cons, volatile, alignstack, dia); Some(self.call(v, inputs, None)) diff --git a/src/librustc_codegen_llvm/llvm/ffi.rs b/src/librustc_codegen_llvm/llvm/ffi.rs index 6108af6c884..0b98fa4eaf5 100644 --- a/src/librustc_codegen_llvm/llvm/ffi.rs +++ b/src/librustc_codegen_llvm/llvm/ffi.rs @@ -1212,8 +1212,8 @@ extern "C" { Dialect: AsmDialect) -> &Value; pub fn LLVMRustInlineAsmVerify(Ty: &Type, - Constraints: *const c_char) - -> Bool; + Constraints: *const c_char) + -> bool; pub fn LLVMRustDebugMetadataVersion() -> u32; pub fn LLVMRustVersionMajor() -> u32;