forked from qt-creator/qt-creator
Clang: Store UsedDefines in the symbol database
We write the new defines in a temporary table and then write every new entry in the usedDefines table, followed by remove of every entry in usedDefines which are not in the temporary table but have a file entry in common with one of the entries in the temporary table. At last we clean up the temporary table. Change-Id: Idf11ce8d17ad9ccef490578059fac08409fcc5d9 Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
This commit is contained in:
@@ -83,7 +83,13 @@ public:
|
||||
|
||||
void insertOrUpdateUsedDefines(const UsedDefines &usedDefines) override
|
||||
{
|
||||
WriteStatement &insertStatement = m_statementFactory.insertIntoNewUsedDefinesStatement;
|
||||
for (const UsedDefine &usedDefine : usedDefines)
|
||||
insertStatement.write(usedDefine.filePathId.filePathId, usedDefine.defineName);
|
||||
|
||||
m_statementFactory.syncNewUsedDefinesStatement.execute();
|
||||
m_statementFactory.deleteOutdatedUsedDefinesStatement.execute();
|
||||
m_statementFactory.deleteNewUsedDefinesTableStatement.execute();
|
||||
}
|
||||
|
||||
void updateProjectPartSources(Utils::SmallStringView projectPartName,
|
||||
|
||||
Reference in New Issue
Block a user