diff options
author | Julie Hockett <juliehockett@google.com> | 2018-05-09 22:25:47 +0000 |
---|---|---|
committer | Julie Hockett <juliehockett@google.com> | 2018-05-09 22:25:47 +0000 |
commit | b524d5e5537507f066f2fcdcb24b3be3c9a4c566 (patch) | |
tree | fb6e77eebba31f79c6c6f234c902d2cb46024c7f /clang/lib/Frontend | |
parent | 4a4384353221b845eccdb631a0f83c66a2544a3c (diff) | |
download | bcm5719-llvm-b524d5e5537507f066f2fcdcb24b3be3c9a4c566.tar.gz bcm5719-llvm-b524d5e5537507f066f2fcdcb24b3be3c9a4c566.zip |
Revert "[clang] Adding CharacteristicKind to PPCallbacks::InclusionDirective"
This reverts commit r331904 because of a memory leak.
llvm-svn: 331932
Diffstat (limited to 'clang/lib/Frontend')
-rw-r--r-- | clang/lib/Frontend/DependencyFile.cpp | 9 | ||||
-rw-r--r-- | clang/lib/Frontend/DependencyGraph.cpp | 23 | ||||
-rw-r--r-- | clang/lib/Frontend/ModuleDependencyCollector.cpp | 3 | ||||
-rw-r--r-- | clang/lib/Frontend/PrintPreprocessedOutput.cpp | 23 | ||||
-rw-r--r-- | clang/lib/Frontend/Rewrite/InclusionRewriter.cpp | 6 |
5 files changed, 26 insertions, 38 deletions
diff --git a/clang/lib/Frontend/DependencyFile.cpp b/clang/lib/Frontend/DependencyFile.cpp index 4e605523dc6..5ad1e97a8ff 100644 --- a/clang/lib/Frontend/DependencyFile.cpp +++ b/clang/lib/Frontend/DependencyFile.cpp @@ -63,8 +63,7 @@ struct DepCollectorPPCallbacks : public PPCallbacks { StringRef FileName, bool IsAngled, CharSourceRange FilenameRange, const FileEntry *File, StringRef SearchPath, StringRef RelativePath, - const Module *Imported, - SrcMgr::CharacteristicKind FileType) override { + const Module *Imported) override { if (!File) DepCollector.maybeAddDependency(FileName, /*FromModule*/false, /*IsSystem*/false, /*IsModuleFile*/false, @@ -194,8 +193,7 @@ public: StringRef FileName, bool IsAngled, CharSourceRange FilenameRange, const FileEntry *File, StringRef SearchPath, StringRef RelativePath, - const Module *Imported, - SrcMgr::CharacteristicKind FileType) override; + const Module *Imported) override; void EndOfMainFile() override { OutputDependencyFile(); @@ -315,8 +313,7 @@ void DFGImpl::InclusionDirective(SourceLocation HashLoc, const FileEntry *File, StringRef SearchPath, StringRef RelativePath, - const Module *Imported, - SrcMgr::CharacteristicKind FileType) { + const Module *Imported) { if (!File) { if (AddMissingHeaderDeps) AddFilename(FileName); diff --git a/clang/lib/Frontend/DependencyGraph.cpp b/clang/lib/Frontend/DependencyGraph.cpp index 660f664447a..67a977e38be 100644 --- a/clang/lib/Frontend/DependencyGraph.cpp +++ b/clang/lib/Frontend/DependencyGraph.cpp @@ -50,8 +50,7 @@ public: StringRef FileName, bool IsAngled, CharSourceRange FilenameRange, const FileEntry *File, StringRef SearchPath, StringRef RelativePath, - const Module *Imported, - SrcMgr::CharacteristicKind FileType) override; + const Module *Imported) override; void EndOfMainFile() override { OutputGraphFile(); @@ -66,17 +65,15 @@ void clang::AttachDependencyGraphGen(Preprocessor &PP, StringRef OutputFile, SysRoot)); } -void DependencyGraphCallback::InclusionDirective( - SourceLocation HashLoc, - const Token &IncludeTok, - StringRef FileName, - bool IsAngled, - CharSourceRange FilenameRange, - const FileEntry *File, - StringRef SearchPath, - StringRef RelativePath, - const Module *Imported, - SrcMgr::CharacteristicKind FileType) { +void DependencyGraphCallback::InclusionDirective(SourceLocation HashLoc, + const Token &IncludeTok, + StringRef FileName, + bool IsAngled, + CharSourceRange FilenameRange, + const FileEntry *File, + StringRef SearchPath, + StringRef RelativePath, + const Module *Imported) { if (!File) return; diff --git a/clang/lib/Frontend/ModuleDependencyCollector.cpp b/clang/lib/Frontend/ModuleDependencyCollector.cpp index 25cad8be6d0..d3b2b00bd67 100644 --- a/clang/lib/Frontend/ModuleDependencyCollector.cpp +++ b/clang/lib/Frontend/ModuleDependencyCollector.cpp @@ -50,8 +50,7 @@ struct ModuleDependencyPPCallbacks : public PPCallbacks { StringRef FileName, bool IsAngled, CharSourceRange FilenameRange, const FileEntry *File, StringRef SearchPath, StringRef RelativePath, - const Module *Imported, - SrcMgr::CharacteristicKind FileType) override { + const Module *Imported) override { if (!File) return; Collector.addFile(File->getName()); diff --git a/clang/lib/Frontend/PrintPreprocessedOutput.cpp b/clang/lib/Frontend/PrintPreprocessedOutput.cpp index 1b35b32656e..36ecdada0c8 100644 --- a/clang/lib/Frontend/PrintPreprocessedOutput.cpp +++ b/clang/lib/Frontend/PrintPreprocessedOutput.cpp @@ -130,8 +130,7 @@ public: StringRef FileName, bool IsAngled, CharSourceRange FilenameRange, const FileEntry *File, StringRef SearchPath, StringRef RelativePath, - const Module *Imported, - SrcMgr::CharacteristicKind FileType) override; + const Module *Imported) override; void Ident(SourceLocation Loc, StringRef str) override; void PragmaMessage(SourceLocation Loc, StringRef Namespace, PragmaMessageKind Kind, StringRef Str) override; @@ -321,17 +320,15 @@ void PrintPPOutputPPCallbacks::FileChanged(SourceLocation Loc, } } -void PrintPPOutputPPCallbacks::InclusionDirective( - SourceLocation HashLoc, - const Token &IncludeTok, - StringRef FileName, - bool IsAngled, - CharSourceRange FilenameRange, - const FileEntry *File, - StringRef SearchPath, - StringRef RelativePath, - const Module *Imported, - SrcMgr::CharacteristicKind FileType) { +void PrintPPOutputPPCallbacks::InclusionDirective(SourceLocation HashLoc, + const Token &IncludeTok, + StringRef FileName, + bool IsAngled, + CharSourceRange FilenameRange, + const FileEntry *File, + StringRef SearchPath, + StringRef RelativePath, + const Module *Imported) { // In -dI mode, dump #include directives prior to dumping their content or // interpretation. if (DumpIncludeDirectives) { diff --git a/clang/lib/Frontend/Rewrite/InclusionRewriter.cpp b/clang/lib/Frontend/Rewrite/InclusionRewriter.cpp index 1631eccd701..3b8d792e3af 100644 --- a/clang/lib/Frontend/Rewrite/InclusionRewriter.cpp +++ b/clang/lib/Frontend/Rewrite/InclusionRewriter.cpp @@ -77,8 +77,7 @@ private: StringRef FileName, bool IsAngled, CharSourceRange FilenameRange, const FileEntry *File, StringRef SearchPath, StringRef RelativePath, - const Module *Imported, - SrcMgr::CharacteristicKind FileType) override; + const Module *Imported) override; void WriteLineInfo(StringRef Filename, int Line, SrcMgr::CharacteristicKind FileType, StringRef Extra = StringRef()); @@ -193,8 +192,7 @@ void InclusionRewriter::InclusionDirective(SourceLocation HashLoc, const FileEntry * /*File*/, StringRef /*SearchPath*/, StringRef /*RelativePath*/, - const Module *Imported, - SrcMgr::CharacteristicKind FileType){ + const Module *Imported) { if (Imported) { auto P = ModuleIncludes.insert( std::make_pair(HashLoc.getRawEncoding(), Imported)); |