[PATCH] D95617: [DWARF] Inlined variables with no location should not have a DW_TAG_variable

Djordje Todorovic via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Feb 1 02:46:51 PST 2021


djtodoro added inline comments.


================
Comment at: llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp:1782-1793
+    for (const auto &Entry : HistoryMapEntries) {
+      if (!Entry.isDbgValue())
+        continue;
+
+      const MachineInstr *MI = Entry.getInstr();
+      assert(MI->isDebugValue());
+      // A DBG_VALUE $noreg is an empty variable location
----------------
Can we refactor this into a predicate function (according to the //CodingStandards//)?


================
Comment at: llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp:1796
+
+    // Do not create a concrete entity if there are no locations.
+    if (!HasALocation)
----------------
Are we covering inlined variables only with this?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D95617/new/

https://reviews.llvm.org/D95617



More information about the llvm-commits mailing list