Instantiator
Generate c++ template instantiations
Loading...
Searching...
No Matches
DependencyAction.hpp
Go to the documentation of this file.
1#ifndef DEPENDENCIES_H_
2#define DEPENDENCIES_H_
3
4#include "clang/Frontend/CompilerInstance.h"
5#include "clang/Frontend/FrontendActions.h"
6#include "clang/Frontend/Utils.h"
7
13class myDependencyCollector : public clang::DependencyCollector
14{
15public:
16 bool sawDependency(llvm::StringRef Filename, bool FromModule, bool IsSystem, bool IsModuleFile, bool IsMissing) override;
17 bool needSystemDependencies() override;
18};
19
25class DependencyAction : public clang::PreprocessOnlyAction
26{
27private:
28 std::unique_ptr<myDependencyCollector> col;
29
30public:
31 std::vector<std::string>* dependencies;
32
33 virtual bool usesPreprocessOnly() const;
34 bool BeginSourceFileAction(clang::CompilerInstance& ci);
35
36 virtual void EndSourceFileAction();
37};
38
39#endif
Action to compute the (header) dependencies of a source file.
virtual void EndSourceFileAction()
virtual bool usesPreprocessOnly() const
std::unique_ptr< myDependencyCollector > col
std::vector< std::string > * dependencies
bool BeginSourceFileAction(clang::CompilerInstance &ci)
This class sets the options for the collection of dependencies.
bool needSystemDependencies() override
bool sawDependency(llvm::StringRef Filename, bool FromModule, bool IsSystem, bool IsModuleFile, bool IsMissing) override