aboutsummaryrefslogtreecommitdiff
path: root/lib/Frontend/CompilerInstance.cpp
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2012-02-02 00:54:52 +0000
committerDouglas Gregor <dgregor@apple.com>2012-02-02 00:54:52 +0000
commitc69a181049ab52da29f8f69316a34c90c3ea3b8e (patch)
treeb1280e8c18379ff252743117256d46a97e22eb43 /lib/Frontend/CompilerInstance.cpp
parentc645ddf240efb112ff8f17371811deb3ebc1a5b5 (diff)
Introduce a -cc1 option "-dependency-graphviz" that determines header
dependencies and outputs them in GraphViz format. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149575 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 1501da4ff4..97dc708cc4 100644
--- a/lib/Frontend/CompilerInstance.cpp
+++ b/lib/Frontend/CompilerInstance.cpp
@@ -275,7 +275,11 @@ void CompilerInstance::createPreprocessor() {
const DependencyOutputOptions &DepOpts = getDependencyOutputOpts();
if (!DepOpts.OutputFile.empty())
AttachDependencyFileGen(*PP, DepOpts);
+ if (!DepOpts.GraphvizOutputFile.empty())
+ AttachDependencyGraphGen(*PP, DepOpts.GraphvizOutputFile,
+ getHeaderSearchOpts().Sysroot);
+
// Handle generating header include information, if requested.
if (DepOpts.ShowHeaderIncludes)
AttachHeaderIncludeGen(*PP);