Instantiator
Generate c++ template instantiations
Loading...
Searching...
No Matches
DependencyAction.cpp
Go to the documentation of this file.
2
3bool myDependencyCollector::sawDependency(llvm::StringRef, bool, bool IsSystem, bool, bool)
4{
5 if(IsSystem) {
6 return false;
7 } else {
8 return true;
9 }
10}
12
13bool DependencyAction::usesPreprocessOnly() const { return true; }
14bool DependencyAction::BeginSourceFileAction(clang::CompilerInstance& ci)
15{
16 clang::Preprocessor& pp = ci.getPreprocessor();
17 col = std::make_unique<myDependencyCollector>();
18 col->attachToPreprocessor(pp);
19 return true;
20}
21
23{
24 auto deps = col->getDependencies();
25 *dependencies = std::vector<std::string>(deps.begin(), deps.end());
26}
virtual void EndSourceFileAction()
virtual bool usesPreprocessOnly() const
std::unique_ptr< myDependencyCollector > col
std::vector< std::string > * dependencies
bool BeginSourceFileAction(clang::CompilerInstance &ci)
bool needSystemDependencies() override
bool sawDependency(llvm::StringRef Filename, bool FromModule, bool IsSystem, bool IsModuleFile, bool IsMissing) override