logic: reduce access to filesystem while indexing

* use canonical filepath cache in cxx indexer
* made constructors of FilePath explicit
* use FilePath at more places instead of string
* forward declares FilePath wherever possible
This commit is contained in:
malte_langkabel
2017-05-04 10:55:16 +02:00
parent 55d3f9c189
commit 054b8fab17
156 changed files with 656 additions and 444 deletions
@@ -4,6 +4,7 @@
#include "clang/Tooling/Tooling.h"
#include "data/parser/cxx/ASTAction.h"
#include "data/parser/cxx/cxxCacheTypes.h"
#include "utility/file/FileRegister.h"
class ASTActionFactory
@@ -11,7 +12,12 @@ class ASTActionFactory
{
public:
explicit ASTActionFactory(
std::shared_ptr<ParserClient> client, std::shared_ptr<FileRegister> fileRegister, bool preprocessorOnly);
std::shared_ptr<ParserClient> client,
std::shared_ptr<FileRegister> fileRegister,
std::shared_ptr<FilePathCache> canonicalFilePathCache,
bool preprocessorOnly
);
virtual ~ASTActionFactory();
virtual clang::FrontendAction* create();
@@ -19,6 +25,7 @@ public:
private:
std::shared_ptr<ParserClient> m_client;
std::shared_ptr<FileRegister> m_fileRegister;
std::shared_ptr<FilePathCache> m_canonicalFilePathCache;
bool m_preprocessorOnly;
};