[PATCH] D121100: [clang][DebugInfo] clang should not generate DW_TAG_subprogram entry without DW_AT_name

David Blaikie via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Mar 10 09:48:13 PST 2022


dblaikie added a comment.

Yeah, happy to hear other perspectives - but my rough reaction is similar: putting mangled names in the "name" field seems problematic (consumer wouldn't necessarily know that the name should be demangled, for instance? Maybe?). So at the IR level maybe it's better to leave those in the linkage name - and maybe we workaround it in the backend when tuning for gdb - putting it in the DW_AT_name field because it's not ideal but the best we can do for GDB? (anyone filed a bug with GDB and/or DWARF for this? (I'd start with GDB and see if they're open to the idea directly - don't use the DWARF committee as an indirect way to request feature work for GDB unless they'd prefer it to be formalized before implementing it))

The various _ and __ names are probably OK as names, but the tests that end up producing mangled names into linkage names seem like not the right direction - maybe those entities need/are missing real names anyway? Might be worth comparing/contrasting with GCC's behavior for similar entities (at a glance at the tests, looks like some thunks are in this situation?)


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D121100



More information about the cfe-commits mailing list