Commit Graph

9 Commits

Author SHA1 Message Date
Marco Bubke
390a227df6 ClangPchManager: Introduce PchTaskQueue
With the PchTaskQueue the pipeline is almost complete.

Task-number: QTCREATORBUG-21346
Change-Id: I5f05d525db1679eb37dd1d462076c1ed42958099
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
2018-12-10 17:09:31 +00:00
Marco Bubke
6eb620238b Clang: Refactor FilePathId
We don't need the directory id any more. It's not used widely any way.

Task-number: QTCREATORBUG-21443
Change-Id: Ia95ea4c72fe9530ac56262f61f17faca04d313ba
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
2018-11-08 12:51:15 +00:00
Marco Bubke
9d7225d283 Clang: Cleanup transaction statements in the database
Change-Id: I795248492fe952c230fd3a9cf8bf16f3c831f161
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
2018-04-09 13:09:45 +00:00
Marco Bubke
23865a102d Clang: Handle constraint exceptions in the file path storage
It can be happen that the entry is written by an other connection after
we tried to read and before we write. This would lead to a double entry
which be prevented by the unique index in the database. In that case we
simply try again and read the id from the database.

Change-Id: I6c9d94e95ae11556bb446813f64be0855be4ddbe
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
2018-04-04 13:35:37 +00:00
Marco Bubke
c5f9765c93 Clang: Handle all busy states in the file storage
It can be happen if different connections try to write and read at the
same time.

Change-Id: I30e9120fdb8f6963f5440eed48e2cfdf8803b2be
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
2018-04-04 13:35:29 +00:00
Marco Bubke
53454b0f79 Clang: Use PCHs for indexing
As generating the AST is quite expensive it would be very useful to cache
the not changed include. So we generate PCHs for include outside of a
project part. With this change this PCHs are used by the indexer.

For that they are save to the symbol database by the PCH manager and when
fetched by the symbol indexer.

Change-Id: I7a5b07cfb32d72d50dc52d2b108cd41727a7bfc7
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
2018-03-22 13:26:24 +00:00
Marco Bubke
89b9dfed84 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>
2018-02-01 15:05:52 +00:00
Marco Bubke
0f8befacd3 Clang: On the road to update and preprocessor support
This patch has grown in a quite big change set and it is really hard to
divide it in different parts.
V2::ProjectPartContainer is now using FileIds instead of file paths. This
cleans code up because it is a big step in the direction that internally
only file ids are used. But it is depending on the file cache, so the
file cache has to be provided as an argument. There is now an interface for
transactions too which are ease the testing of them and enables the support
of preprocessor. It adds macros as symbols and is saving used macros. The
used macro support is enabling update improvements because only if a
changed macro is used it needs to be recompiled. This is still in flux
and can be changed in later patches.

Change-Id: I492a2c9af1201d40fdd9f46a0045f7878bbbaa3d
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
2018-01-29 13:47:09 +00:00
Marco Bubke
d2e15e5f1e 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>
2017-10-05 17:36:37 +00:00