aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
diff options
context:
space:
mode:
authorVladislav Dzhidzhoev <vdzhidzhoev@accesssoftek.com>2025-06-02 15:22:53 +0200
committerGitHub <noreply@github.com>2025-06-02 15:22:53 +0200
commitdec8f1314fbf77a2b557f12275b1a5e7c7a70f32 (patch)
treeeba0a2ddbf713477d87cea3adbf981da3c31c846 /llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
parentb26baf1779cae380040051932e7134371e3058d3 (diff)
downloadllvm-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