[PATCH] D56769: Path: enhance prefix mapping
Dan McGregor via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Nov 25 14:48:33 PST 2019
dankm abandoned this revision.
dankm added a comment.
Herald added a subscriber: ormris.
In D56769#1624345 <https://reviews.llvm.org/D56769#1624345>, @Lekensteyn wrote:
> Should this be abandoned for D49466 <https://reviews.llvm.org/D49466>?
Yes, yes it should.
================
Comment at: include/llvm/Support/Path.h:157
/// /old/foo, /old, <empty> => /foo
/// @endcode
///
----------------
Lekensteyn wrote:
> Perhaps these examples can be extended with special treatment of the trailing slash?
>
> ```
> /old/foo, /old/, /new/ -> /new/foo
> /old/foo, /old/, /new -> /new/foo // looks more desirable than /newfoo I guess?
> /old/foo, /old, /new/ -> /new/foo // looks more desirable than /new//foo I guess?
> /old/foo, /old/, <empty> -> foo // better than /foo?
> ```
>
> The last feature is most important to me for clean stack traces (`/srcdir/subfdir/foo.c` + `-ffile-prefix-map=/srcdir/=` -> `subdir/foo.c`, use `dir /new/srcdir` in gdb to enable proper debugging anyway).
Oh yes, `/old/foo, /old/, <empty> -> foo` is actually what it does now. That's new behaviour as of this patch, I'll update the examples. Good idea with the other examples too.
Repository:
rL LLVM
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D56769/new/
https://reviews.llvm.org/D56769
More information about the llvm-commits
mailing list