diff options
| author | Kristina Bessonova <kbessonova@accesssoftek.com> | 2021-11-27 17:56:40 +0200 |
|---|---|---|
| committer | Kristina Bessonova <kbessonova@accesssoftek.com> | 2021-11-27 17:59:07 +0200 |
| commit | 904328932699cd5e0eefab2c81e4f51421fd3f33 (patch) | |
| tree | 300ca42be8abcdd7c87e973e1a2735ff29ede2ab /lldb/source/Plugins/ScriptInterpreter/Python/PythonDataObjects.cpp | |
| parent | f492a414bad782ae4202d2af9d3408f8e727599d (diff) | |
| download | llvm-904328932699cd5e0eefab2c81e4f51421fd3f33.zip llvm-904328932699cd5e0eefab2c81e4f51421fd3f33.tar.gz llvm-904328932699cd5e0eefab2c81e4f51421fd3f33.tar.bz2 | |
[DwarfCompileUnit] Set parent DIE right after creating a local entity
No functional changes intended.
Before this patch DwarfCompileUnit::createScopeChildrenDIE() and
DwarfCompileUnit::createAndAddScopeChildrenDIE() used to emit child subtrees
and then when all the children get created, attach them to a parent scope DIE.
However, when a DIE doesn't have a parent, all the requests for its unit DIE
fail.
Currently, this is not a big issue since it isn't usually needed to know unit DIE
for a local (function-scoped) entity. But once we introduce lexical blocks as
a valid scope for global variables (static locals) and type DIEs, any requests
for a unit DIE need to be guarded against local scope due to the potential
absence of the DIE's parent.
To avoid the aforementioned issue, this patch refactors a few DwarfCompileUnit
methods to support the idea of attaching a DIE to its parent as close to the
creation of this DIE as possible.
Reviewed By: ellis
Differential Revision: https://reviews.llvm.org/D114350
Diffstat (limited to 'lldb/source/Plugins/ScriptInterpreter/Python/PythonDataObjects.cpp')
0 files changed, 0 insertions, 0 deletions
