diff options
| author | Dimitry Andric <dim@FreeBSD.org> | 2014-11-24 09:15:30 +0000 |
|---|---|---|
| committer | Dimitry Andric <dim@FreeBSD.org> | 2014-11-24 09:15:30 +0000 |
| commit | 9f4dbff6669c8037f3b036bcf580d14f1a4f12a5 (patch) | |
| tree | 47df2c12b57214af6c31e47404b005675b8b7ffc /lib/Frontend/DependencyGraph.cpp | |
| parent | f73d5f23a889b93d89ddef61ac0995df40286bb8 (diff) | |
Notes
Diffstat (limited to 'lib/Frontend/DependencyGraph.cpp')
| -rw-r--r-- | lib/Frontend/DependencyGraph.cpp | 20 |
1 files changed, 8 insertions, 12 deletions
diff --git a/lib/Frontend/DependencyGraph.cpp b/lib/Frontend/DependencyGraph.cpp index e128d91c4083e..051b7f9e14124 100644 --- a/lib/Frontend/DependencyGraph.cpp +++ b/lib/Frontend/DependencyGraph.cpp @@ -46,17 +46,13 @@ public: StringRef SysRoot) : PP(_PP), OutputFile(OutputFile.str()), SysRoot(SysRoot.str()) { } - virtual void InclusionDirective(SourceLocation HashLoc, - const Token &IncludeTok, - StringRef FileName, - bool IsAngled, - CharSourceRange FilenameRange, - const FileEntry *File, - StringRef SearchPath, - StringRef RelativePath, - const Module *Imported); + void InclusionDirective(SourceLocation HashLoc, const Token &IncludeTok, + StringRef FileName, bool IsAngled, + CharSourceRange FilenameRange, const FileEntry *File, + StringRef SearchPath, StringRef RelativePath, + const Module *Imported) override; - virtual void EndOfMainFile() { + void EndOfMainFile() override { OutputGraphFile(); } @@ -83,7 +79,7 @@ void DependencyGraphCallback::InclusionDirective(SourceLocation HashLoc, SourceManager &SM = PP->getSourceManager(); const FileEntry *FromFile = SM.getFileEntryForID(SM.getFileID(SM.getExpansionLoc(HashLoc))); - if (FromFile == 0) + if (!FromFile) return; Dependencies[FromFile].push_back(File); @@ -101,7 +97,7 @@ DependencyGraphCallback::writeNodeReference(raw_ostream &OS, void DependencyGraphCallback::OutputGraphFile() { std::string Err; - llvm::raw_fd_ostream OS(OutputFile.c_str(), Err); + llvm::raw_fd_ostream OS(OutputFile.c_str(), Err, llvm::sys::fs::F_Text); if (!Err.empty()) { PP->getDiagnostics().Report(diag::err_fe_error_opening) << OutputFile << Err; |
