[llvm] 6edc389 - DWARFDie: don't try to compute a full template name for a template parameter packs
David Blaikie via llvm-commits
llvm-commits at lists.llvm.org
Wed Dec 29 14:09:10 PST 2021
Author: David Blaikie
Date: 2021-12-29T14:04:38-08:00
New Revision: 6edc38935aaf98c2ee2e87874330b9dc08d899ab
URL: https://github.com/llvm/llvm-project/commit/6edc38935aaf98c2ee2e87874330b9dc08d899ab
DIFF: https://github.com/llvm/llvm-project/commit/6edc38935aaf98c2ee2e87874330b9dc08d899ab.diff
LOG: DWARFDie: don't try to compute a full template name for a template parameter packs
Otherwise these look a lot like actual templates (they have a name and
they have template parameters) but they don't participate in naming
(this doesn't come up in practice because a template parameter pack DIE
is never referenced from another DIE (so we don't do full name
rebuilding for it) or the subject of simplified template name rebuilding
(never has the _STN prefix)) - it could be tested with some hand crafted
DWARF but doesn't seem important/useful to do so.
This change is just for performance - to avoid trying to parse more
DIEs, etc, when it's not needed when computing the name in the DWARF
verifier.
Added:
Modified:
llvm/lib/DebugInfo/DWARF/DWARFDie.cpp
Removed:
################################################################################
diff --git a/llvm/lib/DebugInfo/DWARF/DWARFDie.cpp b/llvm/lib/DebugInfo/DWARF/DWARFDie.cpp
index b3b2bec82457..49aa27998ace 100644
--- a/llvm/lib/DebugInfo/DWARF/DWARFDie.cpp
+++ b/llvm/lib/DebugInfo/DWARF/DWARFDie.cpp
@@ -802,6 +802,8 @@ void DWARFDie::getFullName(raw_string_ostream &OS,
const char *NamePtr = getShortName();
if (!NamePtr)
return;
+ if (getTag() == DW_TAG_GNU_template_parameter_pack)
+ return;
DWARFTypePrinter(OS).appendUnqualifiedName(*this, OriginalFullName);
}
More information about the llvm-commits
mailing list