diff options
| author | Zalathar <Zalathar@users.noreply.github.com> | 2025-02-01 14:00:20 +1100 |
|---|---|---|
| committer | Zalathar <Zalathar@users.noreply.github.com> | 2025-02-01 14:14:40 +1100 |
| commit | 8ddd9c38f6165d40ca1ab82e1d2bf9890a047c3a (patch) | |
| tree | f3f1f7be5ee0863d0ba23d4178fe034a47bfed08 /compiler/rustc_codegen_llvm/src/llvm/ffi.rs | |
| parent | 949b4673ceebd767cc0b138392b420a050dc6ce0 (diff) | |
| download | rust-8ddd9c38f6165d40ca1ab82e1d2bf9890a047c3a.tar.gz rust-8ddd9c38f6165d40ca1ab82e1d2bf9890a047c3a.zip | |
Use `LLVMDIBuilderCreateDebugLocation`
The LLVM-C binding takes an explicit context, whereas our binding obtained the context from the scope argument.
Diffstat (limited to 'compiler/rustc_codegen_llvm/src/llvm/ffi.rs')
| -rw-r--r-- | compiler/rustc_codegen_llvm/src/llvm/ffi.rs | 14 |
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 f7713e9a726..95896916adc 100644 --- a/compiler/rustc_codegen_llvm/src/llvm/ffi.rs +++ b/compiler/rustc_codegen_llvm/src/llvm/ffi.rs @@ -1740,6 +1740,14 @@ unsafe extern "C" { File: &'ll Metadata, Discriminator: c_uint, // (optional "DWARF path discriminator"; default is 0) ) -> &'ll Metadata; + + pub(crate) fn LLVMDIBuilderCreateDebugLocation<'ll>( + Ctx: &'ll Context, + Line: c_uint, + Column: c_uint, + Scope: &'ll Metadata, + InlinedAt: Option<&'ll Metadata>, + ) -> &'ll Metadata; } #[link(name = "llvm-wrapper", kind = "static")] @@ -2302,12 +2310,6 @@ unsafe extern "C" { Params: Option<&'a DIArray>, ); - pub fn LLVMRustDIBuilderCreateDebugLocation<'a>( - Line: c_uint, - Column: c_uint, - Scope: &'a DIScope, - InlinedAt: Option<&'a DILocation>, - ) -> &'a DILocation; pub fn LLVMRustDILocationCloneWithBaseDiscriminator<'a>( Location: &'a DILocation, BD: c_uint, |
