Skip to content

Commit 377c1cf

Browse files
committed
Revert "D11003: Tolerate DWARF compile unit without filename."
Summary: This code is modifying a support file list after it has been created. This makes it hard to share the file list between type units and compile units in DWARF. It's not a total showstopper, but supporting this while also sharing the lists would make things more complicated. Given that this was added to support a project which never fully materialised, and that even back then there were some concerns about the correctness of this approach (according to D11003#200772 the compile unit name is not guaranteed to be the first one in the support file list), I think we should just delete this workaround. Reviewers: clayborg, tberghammer, dsrbecky Subscribers: aprantl, lldb-commits Differential Revision: https://reviews.llvm.org/D62517 llvm-svn: 361948
1 parent 72e05d0 commit 377c1cf

File tree

1 file changed

+0
-13
lines changed

1 file changed

+0
-13
lines changed

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

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -689,19 +689,6 @@ lldb::CompUnitSP SymbolFileDWARF::ParseCompileUnit(DWARFUnit *dwarf_cu) {
689689
module_sp, dwarf_cu, cu_file_spec, dwarf_cu->GetID(),
690690
cu_language, is_optimized ? eLazyBoolYes : eLazyBoolNo);
691691

692-
// If we just created a compile unit with an invalid file spec,
693-
// try and get the first entry in the supports files from the
694-
// line table as that should be the compile unit.
695-
if (!cu_file_spec) {
696-
cu_file_spec = cu_sp->GetSupportFiles().GetFileSpecAtIndex(1);
697-
if (cu_file_spec) {
698-
(FileSpec &)(*cu_sp) = cu_file_spec;
699-
// Also fix the invalid file spec which was copied from the
700-
// compile unit.
701-
cu_sp->GetSupportFiles().Replace(0, cu_file_spec);
702-
}
703-
}
704-
705692
dwarf_cu->SetUserData(cu_sp.get());
706693

707694
m_obj_file->GetModule()->GetSymbolVendor()->SetCompileUnitAtIndex(

0 commit comments

Comments
 (0)