From a64387bb6be6360df09e4844c35d63b50b20262e Mon Sep 17 00:00:00 2001 From: bjorn3 <17426603+bjorn3@users.noreply.github.com> Date: Wed, 27 Mar 2024 13:28:40 +0000 Subject: [PATCH] Emit DW_AT_external if applicable --- src/debuginfo/mod.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/debuginfo/mod.rs b/src/debuginfo/mod.rs index 4232018916f..ef684199756 100644 --- a/src/debuginfo/mod.rs +++ b/src/debuginfo/mod.rs @@ -221,6 +221,10 @@ pub(crate) fn define_function<'tcx>( entry.set(gimli::DW_AT_decl_file, AttributeValue::FileIndex(Some(file_id))); entry.set(gimli::DW_AT_decl_line, AttributeValue::Udata(line)); + if tcx.is_reachable_non_generic(instance.def_id()) { + entry.set(gimli::DW_AT_external, AttributeValue::FlagPresent); + } + // FIXME set DW_AT_external as appropriate FunctionDebugContext {