[PATCH] D132900: [DWARF] Fix infinite recursion in Type Printer.

David Blaikie via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Sep 12 17:32:09 PDT 2022


dblaikie added inline comments.


================
Comment at: llvm/lib/DebugInfo/DWARF/DWARFTypePrinter.cpp:289-290
 void DWARFTypePrinter::appendQualifiedName(DWARFDie D) {
-  if (D)
+  if (D && !ScopelessDIEs.count(D.getTag()))
     appendScopes(D.getParent());
+
----------------
Might be inclined to use a switch here, rather than a set lookup - and it's probably easier to make a positive list of the things that are scoped than those that aren't.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D132900



More information about the llvm-commits mailing list