Skip to content

Commit 79bd2ac

Browse files
committed
SymbolFile: minor u-opt for loading fission'ed DWARF
In the case that the DWO is a PCM or PCH we will ignore the processing of the fissioned matter. Hoist the check before the `fstat` to avoid an unnecessary FS access. This is not usptream'ed as the change here is local to the Swift tree.
1 parent a4a75f9 commit 79bd2ac

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1797,6 +1797,10 @@ SymbolFileDWARF::GetDwoSymbolFileForCompileUnit(
17971797
dwo_file.AppendPathComponent(dwo_name);
17981798
}
17991799

1800+
if (dwo_file.GetFileNameExtension() == ".pcm" ||
1801+
dwo_file.GetFileNameExtension() == ".pch")
1802+
return nullptr;
1803+
18001804
if (!FileSystem::Instance().Exists(dwo_file)) {
18011805
unit.SetDwoError(
18021806
Status("unable to locate .dwo debug file \"%s\" for skeleton DIE "
@@ -1811,10 +1815,6 @@ SymbolFileDWARF::GetDwoSymbolFileForCompileUnit(
18111815
return nullptr;
18121816
}
18131817

1814-
if (dwo_file.GetFileNameExtension() == ".pcm" ||
1815-
dwo_file.GetFileNameExtension() == ".pch")
1816-
return nullptr;
1817-
18181818
const lldb::offset_t file_offset = 0;
18191819
DataBufferSP dwo_file_data_sp;
18201820
lldb::offset_t dwo_file_data_offset = 0;

0 commit comments

Comments
 (0)