Clang: Add source dependency saving to the symbol storage

The source dependencies are simply a table which connects the include file
with the included file.

Change-Id: I5454e81a2b5b98f05c7ff3f6740a6d45e01772c3
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
This commit is contained in:
Marco Bubke
2018-01-30 18:41:45 +01:00
parent 490523fdbb
commit 89b9dfed84
10 changed files with 164 additions and 3 deletions

View File

@@ -94,6 +94,18 @@ public:
m_statementFactory.deleteNewUsedMacrosTableStatement.execute();
}
void insertOrUpdateSourceDependencies(const SourceDependencies &sourceDependencies) override
{
WriteStatement &insertStatement = m_statementFactory.insertIntoNewSourceDependenciesStatement;
for (SourceDependency sourceDependency : sourceDependencies)
insertStatement.write(sourceDependency.filePathId.filePathId,
sourceDependency.dependencyFilePathId.filePathId);
m_statementFactory.syncNewSourceDependenciesStatement.execute();
m_statementFactory.deleteOutdatedSourceDependenciesStatement.execute();
m_statementFactory.deleteNewSourceDependenciesStatement.execute();
}
void updateProjectPartSources(Utils::SmallStringView projectPartName,
const FilePathIds &sourceFilePathIds) override
{