Skip to content

Commit afcb805

Browse files
committed
[lldb][Progress] Report progress when parsing forward declarations from DWARF (llvm#91452)
This is an attempt at displaying the work that's being done by LLDB when waiting on type-completion events, e.g., when running an expression. This patch adds a single new progress event for cases where we search for the definition DIE of a forward declaration, which can be an expensive operation in the presence of many object files. (cherry picked from commit d32afb3)
1 parent 2dd7b65 commit afcb805

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

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

+6
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
#include "Plugins/ExpressionParser/Clang/ClangUtil.h"
2626
#include "Plugins/Language/ObjC/ObjCLanguage.h"
2727
#include "lldb/Core/Module.h"
28+
#include "lldb/Core/Progress.h"
2829
#include "lldb/Core/Value.h"
2930
#include "lldb/Host/Host.h"
3031
#include "lldb/Symbol/CompileUnit.h"
@@ -1773,6 +1774,11 @@ DWARFASTParserClang::ParseStructureLikeDIE(const SymbolContext &sc,
17731774
}
17741775

17751776
if (attrs.is_forward_declaration) {
1777+
Progress progress(llvm::formatv(
1778+
"Parsing type in {0}: '{1}'",
1779+
dwarf->GetObjectFile()->GetFileSpec().GetFilename().GetString(),
1780+
attrs.name.GetString()));
1781+
17761782
// We have a forward declaration to a type and we need to try and
17771783
// find a full declaration. We look in the current type index just in
17781784
// case we have a forward declaration followed by an actual

0 commit comments

Comments
 (0)