summaryrefslogtreecommitdiffstats
path: root/lib/Frontend/DependencyGraph.cpp
diff options
context:
space:
mode:
authordim <dim@FreeBSD.org>2014-11-24 09:15:30 +0000
committerdim <dim@FreeBSD.org>2014-11-24 09:15:30 +0000
commit173a4f43a911175643bda81ee675e8d9269056ea (patch)
tree47df2c12b57214af6c31e47404b005675b8b7ffc /lib/Frontend/DependencyGraph.cpp
parent88f7a7d5251a2d813460274c92decc143a11569b (diff)
downloadFreeBSD-src-173a4f43a911175643bda81ee675e8d9269056ea.zip
FreeBSD-src-173a4f43a911175643bda81ee675e8d9269056ea.tar.gz
Vendor import of clang RELEASE_350/final tag r216957 (effectively, 3.5.0 release):
https://llvm.org/svn/llvm-project/cfe/tags/RELEASE_350/final@216957
Diffstat (limited to 'lib/Frontend/DependencyGraph.cpp')
-rw-r--r--lib/Frontend/DependencyGraph.cpp20
1 files changed, 8 insertions, 12 deletions
diff --git a/lib/Frontend/DependencyGraph.cpp b/lib/Frontend/DependencyGraph.cpp
index e128d91..051b7f9 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;
OpenPOWER on IntegriCloud