From 0fd6207d3779b57566b7eb2a28e335d681549a33 Mon Sep 17 00:00:00 2001 From: Hans Wennborg Date: Fri, 9 Aug 2013 00:32:23 +0000 Subject: clang-cl: Support /showIncludes This option prints information about #included files to stderr. Clang could already do it, this patch just teaches the existing code about the /showIncludes style and adds the flag. Differential Revision: http://llvm-reviews.chandlerc.com/D1333 llvm-svn: 188037 --- clang/lib/Frontend/CompilerInstance.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'clang/lib/Frontend/CompilerInstance.cpp') diff --git a/clang/lib/Frontend/CompilerInstance.cpp b/clang/lib/Frontend/CompilerInstance.cpp index f06eaf87360..d2e93685062 100644 --- a/clang/lib/Frontend/CompilerInstance.cpp +++ b/clang/lib/Frontend/CompilerInstance.cpp @@ -259,7 +259,7 @@ void CompilerInstance::createPreprocessor() { AttachDependencyGraphGen(*PP, DepOpts.DOTOutputFile, getHeaderSearchOpts().Sysroot); - + // Handle generating header include information, if requested. if (DepOpts.ShowHeaderIncludes) AttachHeaderIncludeGen(*PP); @@ -270,6 +270,11 @@ void CompilerInstance::createPreprocessor() { AttachHeaderIncludeGen(*PP, /*ShowAllHeaders=*/true, OutputPath, /*ShowDepth=*/false); } + + if (DepOpts.PrintShowIncludes) { + AttachHeaderIncludeGen(*PP, /*ShowAllHeaders=*/false, /*OutputPath=*/"", + /*ShowDepth=*/true, /*MSStyle=*/true); + } } // ASTContext -- cgit v1.2.3