[PATCH] D18401: clang-cl: Include /FI headers in /showIncludes output.

Nico Weber via cfe-commits cfe-commits at lists.llvm.org
Wed Mar 23 09:25:42 PDT 2016

thakis created this revision.
thakis added a reviewer: hans.
thakis added a subscriber: cfe-commits.

`-H` in gcc mode doesn't print `-include` headers, but they are included in depfiles written by MMD and friends. Since `/showIncludes` is what's used instead of depfiles, printing `/FI` there seems important (and matches cl.exe).

There's more work to do for the interaction of `/FI`, `/showIncludes`, and PCH flags, but this is a strict improvement over what we have today.

Instead of giving HeaderIncludeGen more options, another approach would be to just switch on ShowAllHeaders in clang-cl mode and let clang::InitializePreprocessor() not put `-include` flags in the `<command line>` block. This would change the behavior of `-E` slightly, and it would remove the `<command line>` flag from the output triggered by setting the obscure `CC_PRINT_HEADERS=1` env var to true while running clang. So don't do that as it would change behavior. (But if someone reading this thinks that's ok to change, I'd prefer doing that, as it makes things simpler.)



-------------- next part --------------
A non-text attachment was scrubbed...
Name: D18401.51430.patch
Type: text/x-patch
Size: 9317 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20160323/49e04b55/attachment.bin>

More information about the cfe-commits mailing list