Clang: Add file cache

The database is using file path integer ids to handle file paths because
otherwise we would save many redundant data. This patch is improving it
further with the introduction of a database based file path cache. The
entries are now divided in a directory path and file name. This is quite
handy for directory based file watching.

Change-Id: I03f2e388e43f3d521d6bf8e39dfb95eb2309dc73
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
This commit is contained in:
Marco Bubke
2017-09-21 11:43:59 +02:00
committed by Tim Jenssen
parent 0be8240002
commit d2e15e5f1e
135 changed files with 3458 additions and 1517 deletions

View File

@@ -30,6 +30,7 @@
#include "symbollocationfinderaction.h"
#include "locationsourcefilecallbacks.h"
#include <filepathcachingfwd.h>
#include <sourcelocationscontainer.h>
namespace ClangBackEnd {
@@ -37,7 +38,7 @@ namespace ClangBackEnd {
class SymbolFinder : public ClangTool
{
public:
SymbolFinder(uint line, uint column);
SymbolFinder(uint line, uint column, FilePathCachingInterface &filePathCache);
void findSymbol();
@@ -47,12 +48,11 @@ public:
SourceLocationsContainer takeSourceLocations();
private:
Utils::SmallString symbolName;
USRFindingAction usrFindingAction;
SymbolLocationFinderAction symbolLocationFinderAction;
LocationSourceFileCallbacks sourceFileCallbacks;
ClangBackEnd::SourceLocationsContainer sourceLocations_;
Utils::SmallString m_symbolName;
USRFindingAction m_usrFindingAction;
SymbolLocationFinderAction m_symbolLocationFinderAction;
LocationSourceFileCallbacks m_sourceFileCallbacks;
ClangBackEnd::SourceLocationsContainer m_sourceLocations_;
};
} // namespace ClangBackEnd