[PATCH] D49466: Initial implementation of -fmacro-prefix-map and -ffile-prefix-map

Dan McGregor via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Jan 11 08:39:45 PST 2019


dankm marked 2 inline comments as done.
dankm added a comment.

In D49466#1354238 <https://reviews.llvm.org/D49466#1354238>, @Lekensteyn wrote:

> It would be nice to have this for Clang 8.0, the branch date is within 5 days :)


Yup, that's why I'm ignoring a new baby for this :)



================
Comment at: lib/Driver/ToolChains/Clang.cpp:617
     if (Map.find('=') == StringRef::npos)
-      D.Diag(diag::err_drv_invalid_argument_to_fdebug_prefix_map) << Map;
+      D.Diag(diag::err_drv_invalid_argument_to_prefix_map) << Map << "debug";
     else
----------------
Lekensteyn wrote:
> For `clang -ffile-prefix-map=foo`, wouldn't this report `invalid argument 'foo' to -fdebug-prefix-map`? If so, perhaps some method of `A` or `A->getOption()` can be used?
Yes, it would seem so. It looks like A->getOption().getName() can be used.


================
Comment at: test/Preprocessor/file_test.c:5
+// RUN: %clang -E -fmacro-prefix-map=%p/= -c -o - %s | FileCheck %s --check-prefix CHECK-REMOVE
+//This is a comment
+
----------------
Lekensteyn wrote:
> Any reason to keep this comment?
Ha. No. That's from when I started writing this test. It can go away.


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