diff options
| author | Ralf Jung <post@ralfj.de> | 2025-06-15 12:14:05 +0000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-06-15 12:14:05 +0000 |
| commit | 5770b90356dbb25e53e2bf51722d1f840df15415 (patch) | |
| tree | 47690c255eb9b79639b9eb3ae1aa4c9c732e138b /compiler/rustc_codegen_llvm/src/llvm/ffi.rs | |
| parent | 3951b5511167ba1ac4f41498c2bb8946a7a04e26 (diff) | |
| parent | 19beef420548f5cd55387d79593f0b39490145a7 (diff) | |
| download | rust-5770b90356dbb25e53e2bf51722d1f840df15415.tar.gz rust-5770b90356dbb25e53e2bf51722d1f840df15415.zip | |
Merge pull request #4400 from RalfJung/rustup
Rustup
Diffstat (limited to 'compiler/rustc_codegen_llvm/src/llvm/ffi.rs')
| -rw-r--r-- | compiler/rustc_codegen_llvm/src/llvm/ffi.rs | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/compiler/rustc_codegen_llvm/src/llvm/ffi.rs b/compiler/rustc_codegen_llvm/src/llvm/ffi.rs index e27fbf94f34..59c61db5fcd 100644 --- a/compiler/rustc_codegen_llvm/src/llvm/ffi.rs +++ b/compiler/rustc_codegen_llvm/src/llvm/ffi.rs @@ -15,6 +15,7 @@ use std::fmt::Debug; use std::marker::PhantomData; +use std::num::NonZero; use std::ptr; use bitflags::bitflags; @@ -1195,6 +1196,17 @@ unsafe extern "C" { // Operations on functions pub(crate) fn LLVMSetFunctionCallConv(Fn: &Value, CC: c_uint); + // Operations about llvm intrinsics + pub(crate) fn LLVMLookupIntrinsicID(Name: *const c_char, NameLen: size_t) -> c_uint; + pub(crate) fn LLVMIntrinsicIsOverloaded(ID: NonZero<c_uint>) -> Bool; + pub(crate) fn LLVMIntrinsicCopyOverloadedName2<'a>( + Mod: &'a Module, + ID: NonZero<c_uint>, + ParamTypes: *const &'a Type, + ParamCount: size_t, + NameLength: *mut size_t, + ) -> *mut c_char; + // Operations on parameters pub(crate) fn LLVMIsAArgument(Val: &Value) -> Option<&Value>; pub(crate) safe fn LLVMCountParams(Fn: &Value) -> c_uint; |
