[PATCH] D113406: [llvm-dwarfdump] dump link to the immediate parent.
James Henderson via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Nov 9 00:25:39 PST 2021
jhenderson added inline comments.
================
Comment at: llvm/test/tools/llvm-dwarfdump/X86/parent_link.s:1
+# RUN: yaml2obj %s -o %t.o
+# RUN: llvm-dwarfdump -v -a %t.o | FileCheck %s
----------------
Perhaps call the test `parent-offset.test` or `parent-offset.yaml`.
1) Underscores are annoying to type - prefer `-` where possible.
2) This test doesn't contain assembly, so use `.test` or `.yaml` instead.
3) `offset` in the name is more explicit. I might even suggest `tag-parent-offset.yaml` might be especially clear.
================
Comment at: llvm/test/tools/llvm-dwarfdump/X86/parent_link.s:4-7
+# This test checks that llvm-dwarfdump prints link
+# to the parent of the current die:
+
+# DW_TAG_base_type (0x0000000b) <<<<<
----------------
Personal preference: use `##` for comments in new tests, to distinguish the comments from the lit and FileCheck directives.
================
Comment at: llvm/test/tools/llvm-dwarfdump/X86/parent_link.s:11
+# CHECK: 0x0000000b: DW_TAG_compile_unit
+# CHECK: DW_TAG_base_type [2] (0x0000000b)
+
----------------
I'd suggest adding one sibling and one additional child tag (child of `DW_TAG_base_type` or the new sibling), to show the variation in the parent offset.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D113406/new/
https://reviews.llvm.org/D113406
More information about the llvm-commits
mailing list