about summary refs log tree commit diff
path: root/compiler/rustc_codegen_llvm
diff options
context:
space:
mode:
authorklensy <klensy@users.noreply.github.com>2023-04-02 17:11:41 +0300
committerklensy <klensy@users.noreply.github.com>2023-04-04 15:12:33 +0300
commit7d6181e4d8e25d83d2fe6b868a313ff9942466cc (patch)
tree730a3219da33f5d33464415d00ac8c0055e38fa1 /compiler/rustc_codegen_llvm
parent0b5f9ac73e087b3728f0fcf53d541d4e80773732 (diff)
downloadrust-7d6181e4d8e25d83d2fe6b868a313ff9942466cc.tar.gz
rust-7d6181e4d8e25d83d2fe6b868a313ff9942466cc.zip
add bunch of fixmes: currently there exist some functions that accept LLVMValueRef, some that accept LLVMMetadataRef, and replacing one with another not always possible without explicit convertion
Diffstat (limited to 'compiler/rustc_codegen_llvm')
-rw-r--r--compiler/rustc_codegen_llvm/src/llvm/ffi.rs8
1 files changed, 8 insertions, 0 deletions
diff --git a/compiler/rustc_codegen_llvm/src/llvm/ffi.rs b/compiler/rustc_codegen_llvm/src/llvm/ffi.rs
index a91edd80558..0ec209c8d43 100644
--- a/compiler/rustc_codegen_llvm/src/llvm/ffi.rs
+++ b/compiler/rustc_codegen_llvm/src/llvm/ffi.rs
@@ -1072,7 +1072,13 @@ extern "C" {
     pub fn LLVMGetPoison(Ty: &Type) -> &Value;
 
     // Operations on metadata
+    // FIXME: deprecated, replace with LLVMMDStringInContext2
     pub fn LLVMMDStringInContext(C: &Context, Str: *const c_char, SLen: c_uint) -> &Value;
+
+    // LLVMMDStringInContext but don't own string
+    pub fn LLVMMDStringInContext2(C: &Context, Str: *const c_char, SLen: size_t) -> &Metadata;
+
+    // FIXME: deprecated, replace with LLVMMDNodeInContext2
     pub fn LLVMMDNodeInContext<'a>(
         C: &'a Context,
         Vals: *const &'a Value,
@@ -1111,6 +1117,8 @@ extern "C" {
         Packed: Bool,
     ) -> &'a Value;
 
+    // FIXME: replace with LLVMConstArray2
+    // https://github.com/llvm/llvm-project/commit/35276f16e5a2cae0dfb49c0fbf874d4d2f177acc
     pub fn LLVMConstArray<'a>(
         ElementTy: &'a Type,
         ConstantVals: *const &'a Value,