Skip to content

Commit 70bf903

Browse files
committed
fixup! codegen_llvm: check inline assembly constraints with LLVM
1 parent fec86c8 commit 70bf903

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

src/librustc_codegen_llvm/builder.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -756,7 +756,7 @@ impl Builder<'a, 'll, 'tcx> {
756756
// Ask LLVM to verify that the constraints are well-formed.
757757
let constraints_ok = llvm::LLVMRustInlineAsmVerify(fty, cons);
758758
debug!("Constraint verification result: {:?}", constraints_ok);
759-
if constraints_ok == 1 {
759+
if constraints_ok == llvm::True {
760760
let v = llvm::LLVMRustInlineAsm(
761761
fty, asm, cons, volatile, alignstack, dia);
762762
Some(self.call(v, inputs, None))

src/librustc_codegen_llvm/mir/statement.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,8 @@ impl FunctionCx<'a, 'll, 'tcx> {
8888

8989
let res = asm::codegen_inline_asm(&bx, asm, outputs, input_vals);
9090
if !res {
91-
span_err!(bx.sess(), statement.source_info.span, E0668, "malformed inline assembly");
91+
span_err!(bx.sess(), statement.source_info.span, E0668,
92+
"malformed inline assembly");
9293
}
9394
bx
9495
}

0 commit comments

Comments
 (0)