about summary refs log tree commit diff
path: root/compiler/rustc_codegen_llvm/src/llvm/ffi.rs
diff options
context:
space:
mode:
authorTomasz Miąsko <tomasz.miasko@gmail.com>2022-03-03 00:00:00 +0000
committerTomasz Miąsko <tomasz.miasko@gmail.com>2022-03-03 00:28:50 +0100
commit926bf1a3718fc408b2d75a7536b7a2ed3d2d070b (patch)
tree524c12d755ea38356df8ddac19baa8d3856c313e /compiler/rustc_codegen_llvm/src/llvm/ffi.rs
parent08504c64aa7c4163a51c1982ed10075bb89cec0e (diff)
downloadrust-926bf1a3718fc408b2d75a7536b7a2ed3d2d070b.tar.gz
rust-926bf1a3718fc408b2d75a7536b7a2ed3d2d070b.zip
Pass LLVM string attributes as string slices
Diffstat (limited to 'compiler/rustc_codegen_llvm/src/llvm/ffi.rs')
-rw-r--r--compiler/rustc_codegen_llvm/src/llvm/ffi.rs5
1 files changed, 3 insertions, 2 deletions
diff --git a/compiler/rustc_codegen_llvm/src/llvm/ffi.rs b/compiler/rustc_codegen_llvm/src/llvm/ffi.rs
index 4a8894983b9..6c944b9e486 100644
--- a/compiler/rustc_codegen_llvm/src/llvm/ffi.rs
+++ b/compiler/rustc_codegen_llvm/src/llvm/ffi.rs
@@ -1175,11 +1175,12 @@ extern "C" {
 
     // Operations on attributes
     pub fn LLVMRustCreateAttrNoValue(C: &Context, attr: AttributeKind) -> &Attribute;
-    pub fn LLVMRustCreateAttrString(C: &Context, Name: *const c_char) -> &Attribute;
-    pub fn LLVMRustCreateAttrStringValue(
+    pub fn LLVMCreateStringAttribute(
         C: &Context,
         Name: *const c_char,
+        NameLen: c_uint,
         Value: *const c_char,
+        ValueLen: c_uint,
     ) -> &Attribute;
     pub fn LLVMRustCreateAlignmentAttr(C: &Context, bytes: u64) -> &Attribute;
     pub fn LLVMRustCreateDereferenceableAttr(C: &Context, bytes: u64) -> &Attribute;