[PATCH] D144008: [DebugMetadata][DwarfDebug] Support function-local static variables in lexical block scopes (7/7)

ykhatav via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Mar 3 08:58:42 PST 2023


ykhatav 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();
----------------
krisb wrote:
> 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. 
Okay, i'll reuse your patch and take a stab at it! Thanks!


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