about summary refs log tree commit diff
diff options
context:
space:
mode:
authorbjorn3 <17426603+bjorn3@users.noreply.github.com>2024-03-27 13:28:40 +0000
committerbjorn3 <17426603+bjorn3@users.noreply.github.com>2024-03-27 13:28:40 +0000
commita64387bb6be6360df09e4844c35d63b50b20262e (patch)
tree089b2408d3f802924423e9e54975063a4b830ec5
parent98eaaeda111673c617134fe2dcd3f10bb6dfc2f0 (diff)
downloadrust-a64387bb6be6360df09e4844c35d63b50b20262e.tar.gz
rust-a64387bb6be6360df09e4844c35d63b50b20262e.zip
Emit DW_AT_external if applicable
-rw-r--r--src/debuginfo/mod.rs4
1 files changed, 4 insertions, 0 deletions
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 @@ impl DebugContext {
         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 {