[PATCH] D49466: Initial implementation of -fmacro-prefix-map and -ffile-prefix-map
Peter Wu via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Sat Jan 12 16:52:24 PST 2019
Lekensteyn accepted this revision.
Lekensteyn added a comment.
This revision is now accepted and ready to land.
Tests pass here, using it on a large CMake project with a CMAKE_BUILD_TYPE=Debug and c/cxxflags `-ffile-prefix-map=$builddir= -ffile-prefix-map=$srcdir/= -fuse-ld=lld` successfully strips all traces of `$builddir` and `$srcdir`.
If you could take care of the previous comment (undo the rename or rename debug-prefix.map.c), then I've no further comments.
If @joerg or someone else could give the final review/pass, that would be great :)
================
Comment at: lib/Driver/ToolChains/Clang.cpp:612
+ if (Map.find('=') == StringRef::npos)
+ D.Diag(diag::err_drv_invalid_argument_to_fdebug_prefix_map) << Map;
+ else
----------------
joerg wrote:
> I'd prefer the bailout style here, i.e. `if (...) { D.diag(...); continue }`
Wouldn't using `if (...) { D.diag(...); continue; }` also skip the `A->claim()` call? Presumably that could result in spurious errors as well about unused arguments?
Repository:
rC Clang
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D49466/new/
https://reviews.llvm.org/D49466
More information about the cfe-commits
mailing list