clang  14.0.0git
Public Member Functions | List of all members
clang::tooling::dependencies::ModuleDepCollector Class Referencefinal

Collects modular and non-modular dependencies of the main file by attaching ModuleDepCollectorPP to the preprocessor. More...

#include "clang/Tooling/DependencyScanning/ModuleDepCollector.h"

Inheritance diagram for clang::tooling::dependencies::ModuleDepCollector:
Inheritance graph
[legend]
Collaboration diagram for clang::tooling::dependencies::ModuleDepCollector:
Collaboration graph
[legend]

Public Member Functions

 ModuleDepCollector (std::unique_ptr< DependencyOutputOptions > Opts, CompilerInstance &ScanInstance, DependencyConsumer &C, CompilerInvocation &&OriginalCI, bool OptimizeArgs)
 
void attachToPreprocessor (Preprocessor &PP) override
 
void attachToASTReader (ASTReader &R) override
 
- Public Member Functions inherited from clang::DependencyCollector
virtual ~DependencyCollector ()
 
ArrayRef< std::stringgetDependencies () const
 
virtual bool sawDependency (StringRef Filename, bool FromModule, bool IsSystem, bool IsModuleFile, bool IsMissing)
 Called when a new file is seen. More...
 
virtual void finishedMainFile (DiagnosticsEngine &Diags)
 Called when the end of the main file is reached. More...
 
virtual bool needSystemDependencies ()
 Return true if system files should be passed to sawDependency(). More...
 
virtual void maybeAddDependency (StringRef Filename, bool FromModule, bool IsSystem, bool IsModuleFile, bool IsMissing)
 Add a dependency Filename if it has not been seen before and sawDependency() returns true. More...
 

Additional Inherited Members

- Protected Member Functions inherited from clang::DependencyCollector
bool addDependency (StringRef Filename)
 Return true if the filename was added to the list of dependencies, false otherwise. More...
 

Detailed Description

Collects modular and non-modular dependencies of the main file by attaching ModuleDepCollectorPP to the preprocessor.

Definition at line 190 of file ModuleDepCollector.h.

Constructor & Destructor Documentation

◆ ModuleDepCollector()

ModuleDepCollector::ModuleDepCollector ( std::unique_ptr< DependencyOutputOptions Opts,
CompilerInstance ScanInstance,
DependencyConsumer C,
CompilerInvocation &&  OriginalCI,
bool  OptimizeArgs 
)

Definition at line 316 of file ModuleDepCollector.cpp.

Member Function Documentation

◆ attachToASTReader()

void ModuleDepCollector::attachToASTReader ( ASTReader R)
overridevirtual

Reimplemented from clang::DependencyCollector.

Definition at line 327 of file ModuleDepCollector.cpp.

◆ attachToPreprocessor()

void ModuleDepCollector::attachToPreprocessor ( Preprocessor PP)
overridevirtual

Reimplemented from clang::DependencyCollector.

Definition at line 323 of file ModuleDepCollector.cpp.

References clang::Preprocessor::addPPCallbacks().


The documentation for this class was generated from the following files: