summaryrefslogtreecommitdiff
path: root/lib/Frontend/CompilerInstance.cpp
diff options
context:
space:
mode:
authorHans Wennborg <hans@hanshq.net>2013-08-09 00:32:23 +0000
committerHans Wennborg <hans@hanshq.net>2013-08-09 00:32:23 +0000
commit708002ede3938256a6223d153a0c040f7a40f5cc (patch)
treea92d6d3a1a2debf58ffaa014af43c1feb52ebf87 /lib/Frontend/CompilerInstance.cpp
parentc8e8e8faff9c21952cca04be664c8e25bd599300 (diff)
downloadclang-708002ede3938256a6223d153a0c040f7a40f5cc.tar.gz
clang-708002ede3938256a6223d153a0c040f7a40f5cc.tar.bz2
clang-708002ede3938256a6223d153a0c040f7a40f5cc.tar.xz
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 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188037 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Frontend/CompilerInstance.cpp')
-rw-r--r--lib/Frontend/CompilerInstance.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/Frontend/CompilerInstance.cpp b/lib/Frontend/CompilerInstance.cpp
index f06eaf8736..d2e9368506 100644
--- a/lib/Frontend/CompilerInstance.cpp
+++ b/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