data: ClangTool gets invoked for cpp files only, headers are parsed on-the-fly

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.
This commit is contained in:
Eberhard Graether
2015-03-09 01:32:51 +01:00
parent abddf57004
commit 7014c8ac4c
22 changed files with 290 additions and 115 deletions
+3 -3
View File
@@ -1,8 +1,8 @@
#include "data/parser/cxx/ASTActionFactory.h"
ASTActionFactory::ASTActionFactory(ParserClient* client, FileManager* fileManager)
ASTActionFactory::ASTActionFactory(ParserClient* client, FileRegister* fileRegister)
: m_client(client)
, m_fileManager(fileManager)
, m_fileRegister(fileRegister)
{
}
@@ -12,5 +12,5 @@ ASTActionFactory::~ASTActionFactory()
clang::FrontendAction* ASTActionFactory::create()
{
return new ASTAction(m_client, m_fileManager);
return new ASTAction(m_client, m_fileRegister);
}