[PATCH] D75093: clang-cl: Add a `/showIncludes:user` flag.

Nico Weber via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Feb 24 17:12:53 PST 2020


thakis created this revision.
thakis added a reviewer: hans.

This flag is like /showIncludes, but it only includes user headers and omits system headers (similar to MD and MMD). The motivation is that projects that already track system includes though other means can use this flag to get consistent behavior on Windows and non-Windows, and it saves tools that output /showIncludes output (e.g. ninja) some work.

implementation-wise, this makes `HeaderIncludesCallback` honor the existing `IncludeSystemHeaders` bit, and changes the three clients of `HeaderIncludesCallback` (`/showIncludes`, `-H`, `CC_PRINT_HEADERS=1`) to pass `-sys-header-deps` to set that bit -- except for `/showIncludes:user`, which doesn't pass it.


https://reviews.llvm.org/D75093

Files:
  clang/include/clang/Driver/CLCompatOptions.td
  clang/lib/Driver/ToolChains/Clang.cpp
  clang/lib/Frontend/DependencyFile.cpp
  clang/lib/Frontend/HeaderIncludeGen.cpp
  clang/test/Driver/cl-options.c
  clang/test/Preprocessor/headermap-rel2.c

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D75093.246346.patch
Type: text/x-patch
Size: 7133 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20200225/17b2507d/attachment.bin>


More information about the cfe-commits mailing list