From 425f48d48078fb6e173b08bbdbf9129212ad85c1 Mon Sep 17 00:00:00 2001 From: Erich Keane Date: Fri, 4 May 2018 15:58:31 +0000 Subject: [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/lib/Frontend/CompilerInstance.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'clang/lib/Frontend/CompilerInstance.cpp') diff --git a/clang/lib/Frontend/CompilerInstance.cpp b/clang/lib/Frontend/CompilerInstance.cpp index 4199cbe0f66..2ec8e8c1652 100644 --- a/clang/lib/Frontend/CompilerInstance.cpp +++ b/clang/lib/Frontend/CompilerInstance.cpp @@ -462,7 +462,7 @@ void CompilerInstance::createPreprocessor(TranslationUnitKind TUKind) { /*ShowDepth=*/false); } - if (DepOpts.PrintShowIncludes) { + if (DepOpts.ShowIncludesDest != ShowIncludesDestination::None) { AttachHeaderIncludeGen(*PP, DepOpts, /*ShowAllHeaders=*/true, /*OutputPath=*/"", /*ShowDepth=*/true, /*MSStyle=*/true); -- cgit v1.2.3