[clang-cl] Print /showIncludes to stderr, if used in combination with /E, /EP or /P
authorErich Keane <erich.keane@intel.com>
Fri, 4 May 2018 15:58:31 +0000 (15:58 +0000)
committerErich Keane <erich.keane@intel.com>
Fri, 4 May 2018 15:58:31 +0000 (15:58 +0000)
commit425f48d48078fb6e173b08bbdbf9129212ad85c1
treeabca04093776d564e08cf35bad6a0d38aef80d1b
parentb18c34bc291a4e49c9399d45f25d7b11a6ccd670
[clang-cl] Print /showIncludes to stderr, if used in combination with /E, /EP or /P

This replicates 'cl.exe' behavior and allows for both preprocessor output and
dependency information to be extraced with a single compiler invocation.

This is especially useful for compiler caching with tools like Mozilla's sccache.

See: https://github.com/mozilla/sccache/issues/246

Patch By: fxb

Differential Revision: https://reviews.llvm.org/D46394

llvm-svn: 331533
clang/include/clang/Frontend/DependencyOutputOptions.h
clang/lib/Driver/ToolChains/Clang.cpp
clang/lib/Frontend/CompilerInstance.cpp
clang/lib/Frontend/CompilerInvocation.cpp
clang/lib/Frontend/HeaderIncludeGen.cpp
clang/test/Driver/cl-options.c
clang/test/Frontend/print-header-includes.c