diff options
| author | Kyle Huey <khuey@kylehuey.com> | 2025-01-17 09:44:09 -0800 |
|---|---|---|
| committer | Josh Stone <jistone@redhat.com> | 2025-01-23 08:45:35 -0800 |
| commit | 4595e112d0c76cd2717f56f6a596f7ebc35f1461 (patch) | |
| tree | faae15cb65cf1029d332c0673473578a70e3fc8d /compiler/rustc_codegen_llvm/src/debuginfo/mod.rs | |
| parent | f6aed49d141b02d2669314e867b632c10be39be9 (diff) | |
| download | rust-4595e112d0c76cd2717f56f6a596f7ebc35f1461.tar.gz rust-4595e112d0c76cd2717f56f6a596f7ebc35f1461.zip | |
When LLVM's location discriminator value limit is exceeded, emit locations with dummy spans instead of dropping them entirely
Revert most of #133194 (except the test and the comment fixes). Then refix not emitting locations at all when the correct location discriminator value exceeds LLVM's capacity. (cherry picked from commit 45ef92731b637a60cbad7cecf5382361bbf40531)
Diffstat (limited to 'compiler/rustc_codegen_llvm/src/debuginfo/mod.rs')
| -rw-r--r-- | compiler/rustc_codegen_llvm/src/debuginfo/mod.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/rustc_codegen_llvm/src/debuginfo/mod.rs b/compiler/rustc_codegen_llvm/src/debuginfo/mod.rs index fae698bea2a..244df1be1d7 100644 --- a/compiler/rustc_codegen_llvm/src/debuginfo/mod.rs +++ b/compiler/rustc_codegen_llvm/src/debuginfo/mod.rs @@ -293,12 +293,12 @@ impl<'ll, 'tcx> DebugInfoCodegenMethods<'tcx> for CodegenCx<'ll, 'tcx> { } // Initialize fn debug context (including scopes). - let empty_scope = Some(DebugScope { + let empty_scope = DebugScope { dbg_scope: self.dbg_scope_fn(instance, fn_abi, Some(llfn)), inlined_at: None, file_start_pos: BytePos(0), file_end_pos: BytePos(0), - }); + }; let mut fn_debug_context = FunctionDebugContext { scopes: IndexVec::from_elem(empty_scope, &mir.source_scopes), inlined_function_scopes: Default::default(), |
