[PATCH] D125691: [DebugInfo][WIP] Add localDecls field to DISubprogram and DILexicalBlock (1/5)

Kristina Bessonova via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon May 16 07:55:59 PDT 2022


krisb created this revision.
krisb added reviewers: dblaikie, aprantl, probinson.
Herald added a subscriber: hiraditya.
Herald added a project: All.
krisb requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

localDecls is intended to track static locals, function- (or lexical-block-)
local types (typedefs, enums, unions) and imported entities.

Thus static locals, function-local enums and imported entities are no
longer go to compile unit's 'globals', 'enums' and 'imports'.
But if '-debug-info-kind' is specified as 'unused-types', function-local
type-like entities will be referenced by CUs 'retainedTypes'.

This patch just adds localDecls field, corresponding clang/backend
changes are in next patches.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D125691

Files:
  llvm/include/llvm/IR/DIBuilder.h
  llvm/include/llvm/IR/DebugInfoMetadata.h
  llvm/lib/AsmParser/LLParser.cpp
  llvm/lib/Bitcode/Reader/MetadataLoader.cpp
  llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
  llvm/lib/IR/AsmWriter.cpp
  llvm/lib/IR/DIBuilder.cpp
  llvm/lib/IR/DebugInfoMetadata.cpp
  llvm/lib/IR/LLVMContextImpl.h
  llvm/test/Assembler/disubprogram-localdecls.ll
  llvm/unittests/IR/MetadataTest.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D125691.429717.patch
Type: text/x-patch
Size: 51364 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220516/008e6dba/attachment-0001.bin>


More information about the llvm-commits mailing list