[PATCH] D115565: [DebugInfo][dsymutil] Keep locations for function-local globals

Jonas Devlieghere via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Dec 13 21:26:59 PST 2021


JDevlieghere accepted this revision.
JDevlieghere added a comment.
This revision is now accepted and ready to land.

Small readability nit, but otherwise this LGTM.



================
Comment at: llvm/lib/DWARFLinker/DWARFLinker.cpp:1426-1432
+  } else if ((Flags & TF_InFunctionScope) &&
+             Abbrev->getTag() == dwarf::DW_TAG_variable) {
+    // Function-local globals could be in the debug map even when the function
+    // is not, e.g., inlined functions.
+    if ((Flags & TF_SkipPC) && Info.InDebugMap)
+      Flags &= ~TF_SkipPC;
   }
----------------
Just for symmetry with the clause above, I would structure this slightly differently.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D115565



More information about the llvm-commits mailing list