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:
Marco Bubke
2018-01-24 18:06:15 +01:00
parent 5cd64e8049
commit b247c4fdeb
6 changed files with 99 additions and 15 deletions

View File

@@ -139,7 +139,7 @@ public:
table.addColumn("usedDefineId", Sqlite::ColumnType::Integer, Sqlite::Contraint::PrimaryKey);
const Sqlite::Column &sourceIdColumn = table.addColumn("sourceId", Sqlite::ColumnType::Integer);
const Sqlite::Column &defineNameColumn = table.addColumn("defineName", Sqlite::ColumnType::Text);
table.addIndex({sourceIdColumn});
table.addIndex({sourceIdColumn, defineNameColumn});
table.addIndex({defineNameColumn});
table.initialize(database);