This change adds the class FileRegister, that splits cpp and h files for the Parser and keeps track which headers have been parsed yet. TranslationUnits get only created for cpp files now, and headers are parsed on the fly. This reduces parse time by around half.
23 lines
500 B
C++
23 lines
500 B
C++
#ifndef AST_ACTION_FACTORY
|
|
#define AST_ACTION_FACTORY
|
|
|
|
#include "clang/Tooling/Tooling.h"
|
|
|
|
#include "data/parser/cxx/ASTAction.h"
|
|
#include "utility/file/FileRegister.h"
|
|
|
|
class ASTActionFactory : public clang::tooling::FrontendActionFactory
|
|
{
|
|
public:
|
|
explicit ASTActionFactory(ParserClient* client, FileRegister* fileRegister);
|
|
virtual ~ASTActionFactory();
|
|
|
|
virtual clang::FrontendAction* create();
|
|
|
|
private:
|
|
ParserClient* m_client;
|
|
FileRegister* m_fileRegister;
|
|
};
|
|
|
|
#endif // AST_ACTION_FACTORY
|