aboutsummaryrefslogtreecommitdiff
path: root/lib/Frontend/CompilerInstance.cpp
diff options
context:
space:
mode:
authorDaniel Dunbar <daniel@zuster.org>2011-02-02 15:41:17 +0000
committerDaniel Dunbar <daniel@zuster.org>2011-02-02 15:41:17 +0000
commiteef63e0997e0f6d6436736ea919b851cfe34955a (patch)
tree0dd2610dd740420ce8dd5c06dc793b2131e050ba /lib/Frontend/CompilerInstance.cpp
parent469a1eb996e1cb0be54f9b210f836afbddcbb2cc (diff)
Frontend: Factor out header include dumping (-H) into its own preprocessor
callbacks class. - Aside from being generally cleaner, this also allows -H to work correctly in modes other than standard preprocessing (e.g., -c, -MM, etc.) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124723 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Frontend/CompilerInstance.cpp')
-rw-r--r--lib/Frontend/CompilerInstance.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/Frontend/CompilerInstance.cpp b/lib/Frontend/CompilerInstance.cpp
index 9ff2e9d1be..dea698d593 100644
--- a/lib/Frontend/CompilerInstance.cpp
+++ b/lib/Frontend/CompilerInstance.cpp
@@ -207,6 +207,10 @@ CompilerInstance::createPreprocessor(Diagnostic &Diags,
if (!DepOpts.OutputFile.empty())
AttachDependencyFileGen(*PP, DepOpts);
+ // Handle generating header include information, if requested.
+ if (DepOpts.ShowHeaderIncludes)
+ AttachHeaderIncludeGen(*PP);
+
return PP;
}