about summary refs log tree commit diff
path: root/compiler/rustc_codegen_llvm/src/llvm
diff options
context:
space:
mode:
authorZalathar <Zalathar@users.noreply.github.com>2025-09-17 21:36:59 +1000
committerZalathar <Zalathar@users.noreply.github.com>2025-09-17 22:32:22 +1000
commit002771ab5c3a329038843d578d5f83c0289a959d (patch)
treec67181a8020dcbe563d1ad658e77960954943e9a /compiler/rustc_codegen_llvm/src/llvm
parentbb21dbeac79da68586d584ed2c7f8e87286fd8a8 (diff)
downloadrust-002771ab5c3a329038843d578d5f83c0289a959d.tar.gz
rust-002771ab5c3a329038843d578d5f83c0289a959d.zip
Use `LLVMDIBuilderCreateQualifiedType`
Diffstat (limited to 'compiler/rustc_codegen_llvm/src/llvm')
-rw-r--r--compiler/rustc_codegen_llvm/src/llvm/ffi.rs14
1 files changed, 8 insertions, 6 deletions
diff --git a/compiler/rustc_codegen_llvm/src/llvm/ffi.rs b/compiler/rustc_codegen_llvm/src/llvm/ffi.rs
index a157a9b8c26..7c8a3261bb8 100644
--- a/compiler/rustc_codegen_llvm/src/llvm/ffi.rs
+++ b/compiler/rustc_codegen_llvm/src/llvm/ffi.rs
@@ -1970,6 +1970,14 @@ unsafe extern "C" {
         ConstantVal: Option<&'ll Value>,
         AlignInBits: u32,
     ) -> &'ll Metadata;
+
+    /// Creates a "qualified type" in the C/C++ sense, by adding modifiers
+    /// like `const` or `volatile`.
+    pub(crate) fn LLVMDIBuilderCreateQualifiedType<'ll>(
+        Builder: &DIBuilder<'ll>,
+        Tag: c_uint, // (DWARF tag, e.g. `DW_TAG_const_type`)
+        Type: &'ll Metadata,
+    ) -> &'ll Metadata;
 }
 
 #[link(name = "llvm-wrapper", kind = "static")]
@@ -2330,12 +2338,6 @@ unsafe extern "C" {
         Ty: &'a DIType,
     ) -> &'a DIType;
 
-    pub(crate) fn LLVMRustDIBuilderCreateQualifiedType<'a>(
-        Builder: &DIBuilder<'a>,
-        Tag: c_uint,
-        Type: &'a DIType,
-    ) -> &'a DIDerivedType;
-
     pub(crate) fn LLVMRustDIBuilderCreateStaticVariable<'a>(
         Builder: &DIBuilder<'a>,
         Context: Option<&'a DIScope>,