Emit DW_AT_external if applicable

This commit is contained in:
bjorn3 2024-03-27 13:28:40 +00:00
parent 98eaaeda11
commit a64387bb6b

View File

@ -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 {