[PATCH] D76733: New symbolizer option to print files relative to the compilation directory.
James Henderson via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Mar 30 01:02:43 PDT 2020
jhenderson added inline comments.
================
Comment at: llvm/docs/CommandGuide/llvm-symbolizer.rst:154
+full path is /tmp/foo/test.cpp and is compiled as follows. The first case
+shows the default absolute paths, the second --basenames and the third
+shows --relativenames.
----------------
paths -> path
================
Comment at: llvm/docs/CommandGuide/llvm-symbolizer.rst:171
+
+
OPTIONS
----------------
Nit: only one blank line, please.
================
Comment at: llvm/test/tools/llvm-symbolizer/relativenames.s:8
+# RUN: llvm-symbolizer 0 --relativenames --obj=%t.o | FileCheck %s -DDIR=%p
+# Ensure last option wins.
+# RUN: llvm-symbolizer 0 --basenames --relativenames --obj=%t.o \
----------------
Something I'm trying to encourage others to do is use '##' for comments, to distinguish them from lit and FileCheck directives.
Also, please add a blank line before this comment to separate it from the regular test case.
================
Comment at: llvm/test/tools/llvm-symbolizer/relativenames.s:12
+# RUN: llvm-symbolizer 0 --relativenames --basenames --obj=%t.o \
+# RUN: | FileCheck %s -DDIR=%p --check-prefix=BASENAMES
+
----------------
No need for the `-DDIR` option here.
================
Comment at: llvm/test/tools/llvm-symbolizer/relativenames.s:14
+
+# CHECK: [[DIR]]{{\\|/}}relativenames.s:4
+# BASENAMES: relativenames.s:4
----------------
I'd explicit make this prefix "RELATIVE" to help contrast the last-one-wins cases.
================
Comment at: llvm/test/tools/llvm-symbolizer/relativenames.s:15
+# CHECK: [[DIR]]{{\\|/}}relativenames.s:4
+# BASENAMES: relativenames.s:4
----------------
This doesn't actually show that the basenames won: by default, check patterns looks for substrings that match, not just full lines (see FileCheck --match-full-lines). You'll want to add at the start the start-of-line regex: `{{^}}`.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D76733/new/
https://reviews.llvm.org/D76733
More information about the llvm-commits
mailing list