Skip to content

Commit 07603db

Browse files
committed
fixup! don't overwrite variable type
1 parent e78b47c commit 07603db

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3423,7 +3423,10 @@ VariableSP SymbolFileDWARF::ParseVariableDIE(const SymbolContext &sc,
34233423
mangled = form_value.AsCString();
34243424
break;
34253425
case DW_AT_type:
3426-
type_die_form = form_value;
3426+
// DW_AT_type on declaration may be less accurate than
3427+
// that of definition, so don't overwrite it.
3428+
if (!type_die_form.IsValid())
3429+
type_die_form = form_value;
34273430
break;
34283431
case DW_AT_external:
34293432
is_external = form_value.Boolean();

0 commit comments

Comments
 (0)