[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
Wed Mar 1 06:21:13 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();
----------------
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.


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