From c7e70c433efc6953dc3888b9fbf9f3512d7da2b0 Mon Sep 17 00:00:00 2001 From: Dimitry Andric Date: Thu, 2 Aug 2018 17:33:11 +0000 Subject: Vendor import of clang trunk r338536: https://llvm.org/svn/llvm-project/cfe/trunk@338536 --- lib/Frontend/DependencyGraph.cpp | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'lib/Frontend/DependencyGraph.cpp') diff --git a/lib/Frontend/DependencyGraph.cpp b/lib/Frontend/DependencyGraph.cpp index 660f664447ab1..c6c9ac2ea2fa5 100644 --- a/lib/Frontend/DependencyGraph.cpp +++ b/lib/Frontend/DependencyGraph.cpp @@ -33,9 +33,9 @@ class DependencyGraphCallback : public PPCallbacks { llvm::SetVector AllFiles; typedef llvm::DenseMap > DependencyMap; - + DependencyMap Dependencies; - + private: raw_ostream &writeNodeReference(raw_ostream &OS, const FileEntry *Node); @@ -56,7 +56,7 @@ public: void EndOfMainFile() override { OutputGraphFile(); } - + }; } @@ -75,11 +75,11 @@ void DependencyGraphCallback::InclusionDirective( const FileEntry *File, StringRef SearchPath, StringRef RelativePath, - const Module *Imported, + const Module *Imported, SrcMgr::CharacteristicKind FileType) { if (!File) return; - + SourceManager &SM = PP->getSourceManager(); const FileEntry *FromFile = SM.getFileEntryForID(SM.getFileID(SM.getExpansionLoc(HashLoc))); @@ -87,7 +87,7 @@ void DependencyGraphCallback::InclusionDirective( return; Dependencies[FromFile].push_back(File); - + AllFiles.insert(File); AllFiles.insert(FromFile); } @@ -109,7 +109,7 @@ void DependencyGraphCallback::OutputGraphFile() { } OS << "digraph \"dependencies\" {\n"; - + // Write the nodes for (unsigned I = 0, N = AllFiles.size(); I != N; ++I) { // Write the node itself. @@ -119,15 +119,15 @@ void DependencyGraphCallback::OutputGraphFile() { StringRef FileName = AllFiles[I]->getName(); if (FileName.startswith(SysRoot)) FileName = FileName.substr(SysRoot.size()); - + OS << DOT::EscapeString(FileName) << "\"];\n"; } // Write the edges - for (DependencyMap::iterator F = Dependencies.begin(), + for (DependencyMap::iterator F = Dependencies.begin(), FEnd = Dependencies.end(); - F != FEnd; ++F) { + F != FEnd; ++F) { for (unsigned I = 0, N = F->second.size(); I != N; ++I) { OS.indent(2); writeNodeReference(OS, F->first); -- cgit v1.2.3