diff options
author | Vladislav Dzhidzhoev <vdzhidzhoev@accesssoftek.com> | 2025-06-02 15:22:53 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-06-02 15:22:53 +0200 |
commit | dec8f1314fbf77a2b557f12275b1a5e7c7a70f32 (patch) | |
tree | eba0a2ddbf713477d87cea3adbf981da3c31c846 /llvm/lib/Bitcode/Writer/BitcodeWriter.cpp | |
parent | b26baf1779cae380040051932e7134371e3058d3 (diff) | |
download | llvm-dec8f1314fbf77a2b557f12275b1a5e7c7a70f32.zip llvm-dec8f1314fbf77a2b557f12275b1a5e7c7a70f32.tar.gz llvm-dec8f1314fbf77a2b557f12275b1a5e7c7a70f32.tar.bz2 |
[llvm][DebugInfo][clang] Finalize all declaration subprograms in DIBuilder::finalize() (#139914)
DIBuilder began tracking definition subprograms and finalizing them in
`DIBuilder::finalize()` in eb1bb4e419.
Currently, `finalizeSubprogram()` attaches local variables, imported
entities, and labels to the `retainedNodes:` field of a corresponding
subprogram.
After 75819aedf, the definition and some declaration subprograms are
finalized in `DIBuilder::finalize()`:
`AllSubprograms` holds references to definition subprograms.
`AllRetainTypes` holds references to declaration subprograms.
For DISubprogram elements of both variables, `finalizeSubprogram()` was
called there.
However, `retainTypes()` is not necessarily called for every declaration
subprogram (as in 40a3fcb0).
DIBuilder clients may also want to attach DILocalVariables to
declaration subprograms, for example, in 58bdf8f9a8.
Thus, the `finalizeSubprogram()` function is called for all definition
subprograms in `DIBuilder::finalize()` because they are stored in the
`AllSubprograms` by the `CreateFunction(isDefinition: true)` call. But
for the declaration subprograms, it should be called manually.
With this commit, `AllSubprograms` is used for holding and finalizing all DISubprograms.
Diffstat (limited to 'llvm/lib/Bitcode/Writer/BitcodeWriter.cpp')
0 files changed, 0 insertions, 0 deletions