summaryrefslogtreecommitdiffstats
path: root/clang/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
commit0fd6207d3779b57566b7eb2a28e335d681549a33 (patch)
treea6732f1201adcabcf8c22a7776070fa35ce4a819 /clang/lib/Frontend/CompilerInstance.cpp
parent91555bde88dd991b60f4bf467dae74c6ce4f7bfd (diff)
downloadbcm5719-llvm-0fd6207d3779b57566b7eb2a28e335d681549a33.tar.gz
bcm5719-llvm-0fd6207d3779b57566b7eb2a28e335d681549a33.zip
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
Diffstat (limited to 'clang/lib/Frontend/CompilerInstance.cpp')
-rw-r--r--clang/lib/Frontend/CompilerInstance.cpp7
1 files changed, 6 insertions, 1 deletions
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
OpenPOWER on IntegriCloud