[PATCH] D120610: [DebugInfo] Include DW_TAG_skeleton_unit when looking for parent UnitDie
Wenlei He via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Mar 9 17:38:58 PST 2022
wenlei updated this revision to Diff 414251.
wenlei added a comment.
Herald added projects: clang, All.
Herald added a subscriber: cfe-commits.
Add test case.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D120610/new/
https://reviews.llvm.org/D120610
Files:
clang/test/CodeGen/split-debug-inlining-template.c
llvm/lib/CodeGen/AsmPrinter/DIE.cpp
Index: llvm/lib/CodeGen/AsmPrinter/DIE.cpp
===================================================================
--- llvm/lib/CodeGen/AsmPrinter/DIE.cpp
+++ llvm/lib/CodeGen/AsmPrinter/DIE.cpp
@@ -204,6 +204,7 @@
const DIE *p = this;
while (p) {
if (p->getTag() == dwarf::DW_TAG_compile_unit ||
+ p->getTag() == dwarf::DW_TAG_skeleton_unit ||
p->getTag() == dwarf::DW_TAG_type_unit)
return p;
p = p->getParent();
Index: clang/test/CodeGen/split-debug-inlining-template.c
===================================================================
--- /dev/null
+++ clang/test/CodeGen/split-debug-inlining-template.c
@@ -0,0 +1,16 @@
+// Check that we handle template types for split-dwarf-inlining without ICE.
+// RUN: %clang_cc1 -emit-obj -fdebug-info-for-profiling -fsplit-dwarf-inlining -debug-info-kind=constructor -dwarf-version=5 -split-dwarf-file %t.dwo -O2 -o %t.o -x c++ %s
+
+struct container {
+ int size();
+};
+
+template <typename T>
+int Range(T &x) {
+ return x.size();
+}
+
+int main() {
+ container v;
+ return Range<container>(v);
+}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D120610.414251.patch
Type: text/x-patch
Size: 1087 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20220310/12b3ac7c/attachment.bin>
More information about the cfe-commits
mailing list