[PATCH] D76733: New symbolizer option to print files relative to the compilation directory.

Fangrui Song via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Mar 30 16:57:20 PDT 2020


MaskRay accepted this revision.
MaskRay added a comment.
This revision is now accepted and ready to land.

The code change looks good but please wait for @jhenderson's approval.



================
Comment at: llvm/tools/llvm-symbolizer/llvm-symbolizer.cpp:80
 
+// -relativenames
+static cl::opt<bool>
----------------
saugustine wrote:
> MaskRay wrote:
> > Double-dashed `--relativenames` may be better (and is the one in the documentation and --help output)
> The code as written allows one to specify it either way. Just like basenames.
Yes, this is how llvm::cl::ParseCommandLineOptions works unless `LongOptionsUseDoubleDash` is set to true. This is not ideal, though. For references in comments/documentation we should just use the canonical form: `--relativenames`.

We might choose to set `LongOptionsUseDoubleDash` for llvm-addr2line to disambiguate option parsing.


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