aboutsummaryrefslogtreecommitdiff
path: root/clang/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
commit83d46be31e56be9708495a832345bcec7499f904 (patch)
treea4a9aeae1cedeab5b9c6cea7ea87795c9770ae80 /clang/lib/Frontend/CompilerInstance.cpp
parenta367022ce707107313d9144a25615f259d645473 (diff)
downloadllvm-83d46be31e56be9708495a832345bcec7499f904.zip
llvm-83d46be31e56be9708495a832345bcec7499f904.tar.gz
llvm-83d46be31e56be9708495a832345bcec7499f904.tar.bz2
Introduce a -cc1 option "-dependency-graphviz" that determines header
dependencies and outputs them in GraphViz format. llvm-svn: 149575
Diffstat (limited to 'clang/lib/Frontend/CompilerInstance.cpp')
-rw-r--r--clang/lib/Frontend/CompilerInstance.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/clang/lib/Frontend/CompilerInstance.cpp b/clang/lib/Frontend/CompilerInstance.cpp
index 1501da4..97dc708 100644
--- a/clang/lib/Frontend/CompilerInstance.cpp
+++ b/clang/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);