Port most of LLVMRustPrintTargetCPUs to Rust

This commit is contained in:
Zalathar 2024-11-02 12:40:28 +11:00
parent 0fa86f9660
commit 90f2075b66
3 changed files with 70 additions and 76 deletions

View file

@ -2190,12 +2190,8 @@ unsafe extern "C" {
pub fn LLVMRustHasFeature(T: &TargetMachine, s: *const c_char) -> bool;
pub fn LLVMRustPrintTargetCPUs(
T: &TargetMachine,
cpu: *const c_char,
print: unsafe extern "C" fn(out: *mut c_void, string: *const c_char, len: usize),
out: *mut c_void,
);
#[allow(improper_ctypes)]
pub(crate) fn LLVMRustPrintTargetCPUs(TM: &TargetMachine, OutStr: &RustString);
pub fn LLVMRustGetTargetFeaturesCount(T: &TargetMachine) -> size_t;
pub fn LLVMRustGetTargetFeature(
T: &TargetMachine,