forked from qt-creator/qt-creator
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user