mirror of
https://github.com/rust-lang/rust.git
synced 2025-05-14 02:49:40 +00:00
Make LLVMRustInlineAsmVerify
take *const c_uchar
This avoids the need for an explicit `as_c_char_ptr` conversion.
This commit is contained in:
parent
b1094f6a0a
commit
b6300294a8
@ -14,7 +14,7 @@ use smallvec::SmallVec;
|
||||
use tracing::debug;
|
||||
|
||||
use crate::builder::Builder;
|
||||
use crate::common::{AsCCharPtr, Funclet};
|
||||
use crate::common::Funclet;
|
||||
use crate::context::CodegenCx;
|
||||
use crate::type_::Type;
|
||||
use crate::type_of::LayoutLlvmExt;
|
||||
@ -477,8 +477,7 @@ pub(crate) fn inline_asm_call<'ll>(
|
||||
debug!("Asm Output Type: {:?}", output);
|
||||
let fty = bx.cx.type_func(&argtys, output);
|
||||
// Ask LLVM to verify that the constraints are well-formed.
|
||||
let constraints_ok =
|
||||
unsafe { llvm::LLVMRustInlineAsmVerify(fty, cons.as_c_char_ptr(), cons.len()) };
|
||||
let constraints_ok = unsafe { llvm::LLVMRustInlineAsmVerify(fty, cons.as_ptr(), cons.len()) };
|
||||
debug!("constraint verification result: {:?}", constraints_ok);
|
||||
if constraints_ok {
|
||||
let v = unsafe {
|
||||
|
@ -2013,7 +2013,7 @@ unsafe extern "C" {
|
||||
|
||||
pub(crate) fn LLVMRustInlineAsmVerify(
|
||||
Ty: &Type,
|
||||
Constraints: *const c_char,
|
||||
Constraints: *const c_uchar, // See "PTR_LEN_STR".
|
||||
ConstraintsLen: size_t,
|
||||
) -> bool;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user