[DebugMetadata] Simplify handling subprogram's retainedNodes field. NFCI (1/7)
authorVladislav Dzhidzhoev <vdzhidzhoev@accesssoftek.com>
Mon, 12 Jun 2023 14:01:18 +0000 (16:01 +0200)
committerVladislav Dzhidzhoev <vdzhidzhoev@accesssoftek.com>
Mon, 12 Jun 2023 16:38:47 +0000 (18:38 +0200)
commited506dd6cecd9653cf9202bfe195891a33482852
tree43dc0a282e40806dbb8826daedbaac1c34fab39c
parent11e5a0d290bac87f3290547fa2b0aaffc98a798e
[DebugMetadata] Simplify handling subprogram's retainedNodes field. NFCI (1/7)

RFC https://discourse.llvm.org/t/rfc-dwarfdebug-fix-and-improve-handling-imported-entities-types-and-static-local-in-subprogram-and-lexical-block-scopes/68544

Currently, `retainedNodes` tracks function-local variables and labels.
To support function-local import, types and static variables (which are globals
in LLVM IR), subsequent patches use the same field. So this patch makes
preliminary refactoring of the code tracking local entities to apply future
functional changes lucidly and cleanly.

No functional changes intended.

Differential Revision: https://reviews.llvm.org/D143984

Authored-by: Kristina Bessonova <kbessonova@accesssoftek.com>
clang/test/CodeGen/attr-btf_tag-disubprogram-callsite.c
clang/test/CodeGenCXX/aix-static-init-debug-info.cpp
clang/test/CodeGenCXX/debug-info-cxx1y.cpp
clang/test/CodeGenCXX/debug-info-template.cpp
clang/test/CodeGenObjC/debug-info-category.m
llvm/include/llvm/IR/DIBuilder.h
llvm/include/llvm/IR/DebugInfoMetadata.h
llvm/lib/IR/DIBuilder.cpp
llvm/test/Bindings/OCaml/debuginfo.ml