Clang: Add BuildDependenciesStorage

Task-number: QTCREATORBUG-21378
Change-Id: Ibcb90239d240653b21f12a7b96a7775e5b0b4319
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
This commit is contained in:
Marco Bubke
2018-11-07 17:48:25 +01:00
parent 0e5c7f51fa
commit 9b1e7e440a
21 changed files with 242 additions and 187 deletions

View File

@@ -58,7 +58,7 @@ private:
SymbolIndexer::SymbolIndexer(SymbolIndexerTaskQueueInterface &symbolIndexerTaskQueue,
SymbolStorageInterface &symbolStorage,
UsedMacroAndSourceStorageInterface &usedMacroAndSourceStorage,
BuildDependenciesStorageInterface &usedMacroAndSourceStorage,
ClangPathWatcherInterface &pathWatcher,
FilePathCachingInterface &filePathCache,
FileStatusCache &fileStatusCache,

View File

@@ -28,7 +28,7 @@
#include "filestatuscache.h"
#include "symbolindexertaskqueueinterface.h"
#include "symbolstorageinterface.h"
#include "usedmacroandsourcestorageinterface.h"
#include "builddependenciesstorageinterface.h"
#include "clangpathwatcher.h"
#include <projectpartcontainerv2.h>
@@ -43,7 +43,7 @@ class SymbolIndexer final : public ClangPathWatcherNotifier
public:
SymbolIndexer(SymbolIndexerTaskQueueInterface &symbolIndexerTaskQueue,
SymbolStorageInterface &symbolStorage,
UsedMacroAndSourceStorageInterface &usedMacroAndSourceStorage,
BuildDependenciesStorageInterface &usedMacroAndSourceStorage,
ClangPathWatcherInterface &pathWatcher,
FilePathCachingInterface &filePathCache,
FileStatusCache &fileStatusCache,
@@ -73,7 +73,7 @@ public:
private:
SymbolIndexerTaskQueueInterface &m_symbolIndexerTaskQueue;
SymbolStorageInterface &m_symbolStorage;
UsedMacroAndSourceStorageInterface &m_usedMacroAndSourceStorage;
BuildDependenciesStorageInterface &m_usedMacroAndSourceStorage;
ClangPathWatcherInterface &m_pathWatcher;
FilePathCachingInterface &m_filePathCache;
FileStatusCache &m_fileStatusCache;

View File

@@ -34,7 +34,7 @@
#include "taskscheduler.h"
#include "symbolstorage.h"
#include <usedmacroandsourcestorage.h>
#include <builddependenciesstorage.h>
#include <refactoringdatabaseinitializer.h>
#include <filepathcachingfwd.h>
@@ -74,7 +74,7 @@ private:
class SymbolIndexing final : public SymbolIndexingInterface
{
public:
using UsedMacroAndSourceStorage = ClangBackEnd::UsedMacroAndSourceStorage<Sqlite::Database>;
using BuildDependenciesStorage = ClangBackEnd::BuildDependenciesStorage<Sqlite::Database>;
using SymbolStorage = ClangBackEnd::SymbolStorage<Sqlite::Database>;
SymbolIndexing(Sqlite::Database &database,
FilePathCachingInterface &filePathCache,
@@ -111,7 +111,7 @@ public:
private:
using SymbolIndexerTaskScheduler = TaskScheduler<SymbolsCollectorManager, SymbolIndexerTask::Callable>;
FilePathCachingInterface &m_filePathCache;
UsedMacroAndSourceStorage m_usedMacroAndSourceStorage;
BuildDependenciesStorage m_usedMacroAndSourceStorage;
SymbolStorage m_symbolStorage;
ClangPathWatcher<QFileSystemWatcher, QTimer> m_sourceWatcher{m_filePathCache};
FileStatusCache m_fileStatusCache{m_filePathCache};

View File

@@ -42,6 +42,11 @@ public:
filePathId(filePathId)
{}
UsedMacro(Utils::SmallStringView macroName, int filePathId)
: macroName(macroName),
filePathId(filePathId)
{}
friend bool operator<(const UsedMacro &first, const UsedMacro &second)
{
return std::tie(first.filePathId, first.macroName)