diff options
author | dim <dim@FreeBSD.org> | 2014-11-24 18:11:16 +0000 |
---|---|---|
committer | dim <dim@FreeBSD.org> | 2014-11-24 18:11:16 +0000 |
commit | 6148c19c738a92f344008aa3f88f4e008bada0ee (patch) | |
tree | d4426858455f04d0d8c25a2f9eb9ea5582ffe1b6 /contrib/llvm/tools/clang/lib/Frontend/DependencyGraph.cpp | |
parent | 2c8643c6396b0a3db33430cf9380e70bbb9efce0 (diff) | |
parent | 173a4f43a911175643bda81ee675e8d9269056ea (diff) | |
download | FreeBSD-src-6148c19c738a92f344008aa3f88f4e008bada0ee.zip FreeBSD-src-6148c19c738a92f344008aa3f88f4e008bada0ee.tar.gz |
Merge clang 3.5.0 release from ^/vendor/clang/dist, resolve conflicts,
and preserve our customizations, where necessary.
Diffstat (limited to 'contrib/llvm/tools/clang/lib/Frontend/DependencyGraph.cpp')
-rw-r--r-- | contrib/llvm/tools/clang/lib/Frontend/DependencyGraph.cpp | 20 |
1 files changed, 8 insertions, 12 deletions
diff --git a/contrib/llvm/tools/clang/lib/Frontend/DependencyGraph.cpp b/contrib/llvm/tools/clang/lib/Frontend/DependencyGraph.cpp index e128d91..051b7f9 100644 --- a/contrib/llvm/tools/clang/lib/Frontend/DependencyGraph.cpp +++ b/contrib/llvm/tools/clang/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; |