[PATCH] D144008: [DebugMetadata][DwarfDebug] Support function-local static variables in lexical block scopes (7/7)
Kristina Bessonova via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Mar 2 07:54:16 PST 2023
krisb added inline comments.
================
Comment at: llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp:1437
CU->getOrCreateTypeDIE(Ty);
- else
+ else if (auto *GVE = dyn_cast<DIGlobalVariableExpression>(D)) {
+ DIGlobalVariable *GV = GVE->getVariable();
----------------
ykhatav wrote:
> Have you thought about adding this support to CodeView as well? I believe that a similar code could be added to CodeViewDebug::endModule() for the CodeView emission to display static locals in proper lexical blocks.
Unfortunately, I'm not quite familiar with CodeView, but I'm going to take a look at it before committing clang's part (see https://reviews.llvm.org/D125694), since it may cause issues with other debugging formats. But if you want to go ahead I'll be happy if you could reuse this patch or any other from the patchset to improve CodeView.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D144008/new/
https://reviews.llvm.org/D144008
More information about the llvm-commits
mailing list