diff options
author | Daniel Dunbar <daniel@zuster.org> | 2011-02-02 21:11:31 +0000 |
---|---|---|
committer | Daniel Dunbar <daniel@zuster.org> | 2011-02-02 21:11:31 +0000 |
commit | b34d69b9292534c1c574f168f0ac10aea652adca (patch) | |
tree | fae1f3c18dec879a8250cc6d40bebed9859dda50 /lib/Frontend/CompilerInstance.cpp | |
parent | b376e5e71aa3e608c0481a9a7facb5d8b29d3163 (diff) |
Frontend: Add -header-include-file option, for allowing saving header include
information to a file.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124750 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Frontend/CompilerInstance.cpp')
-rw-r--r-- | lib/Frontend/CompilerInstance.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/Frontend/CompilerInstance.cpp b/lib/Frontend/CompilerInstance.cpp index dea698d593..92aed39b5c 100644 --- a/lib/Frontend/CompilerInstance.cpp +++ b/lib/Frontend/CompilerInstance.cpp @@ -210,6 +210,12 @@ CompilerInstance::createPreprocessor(Diagnostic &Diags, // Handle generating header include information, if requested. if (DepOpts.ShowHeaderIncludes) AttachHeaderIncludeGen(*PP); + if (!DepOpts.HeaderIncludeOutputFile.empty()) { + llvm::StringRef OutputPath = DepOpts.HeaderIncludeOutputFile; + if (OutputPath == "-") + OutputPath = ""; + AttachHeaderIncludeGen(*PP, /*ShowAllHeaders=*/true, OutputPath); + } return PP; } |