Commit Graph

14 Commits

Author SHA1 Message Date
Marco Bubke
32e181f5ce ClangRefactoring: Remove not used pch files
Because we use UUID for pch files every time we rebuild a pch we get
a new file. This patch is collecting and removing this pch files.

Change-Id: Ia8688e7215ee7b41f39b2285323eaa345056bda3
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2020-06-30 09:52:50 +00:00
Marco Bubke
56d611e0a3 ClangPchManager: Update PCHs if time stamps of dependencies changed
If there is a newer file than the last indexing or if a file is added or
removed from the project or system PCH we have to reindex the project and
maybe the system PCH.

Change-Id: Ibce2a244190a79b5c422c469c065ddc11e44b2cb
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2019-08-27 11:50:39 +00:00
Marco Bubke
578b70e998 Clang: Add fetchTimeStamps to PrecompiledHeaderStorage
Change-Id: I75552a971fbc39a81e14e3b9ec0c5125d3858025
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2019-08-27 11:50:02 +00:00
Marco Bubke
0fe6811acd ClangPchManager: Use TimeStamp instead of long long
Change-Id: If8a429238d31492506c68bb523ceeb4bacad157e
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2019-08-27 11:49:48 +00:00
Marco Bubke
cc78969bdb Clang: Improve updating of PCHs
Instead of deleting the path and time stamp of the project PCH we always
set the time stamp but delete only the path if PCH creation failed. A
failed PCH will be no rebuilt if the files changed. We have to add that
feature later.

Change-Id: I1094271f9ead5d906e94b68ac91c0becd2371ca9
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2019-08-27 11:49:16 +00:00
Marco Bubke
eaaff9da7e Clang: Reindex without PCHs if error are occurring
If an occurs we first reindex with the system PCH only and if it is still
occurring we are indexing without any PCH.

Task-number: QTCREATORBUG-22011
Change-Id: I815ee3abe7829aaeb191d985cd045bac35015893
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
2019-04-23 09:09:06 +00:00
Marco Bubke
3fc8217113 Clang: Refactor fetchPrecompiledHeader
We don't need the other information any more.

Change-Id: Ie34a646df34e336591c124093a15e90307ac88ec
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
2019-04-23 09:08:44 +00:00
Marco Bubke
7595c9f305 ClangPchManager: Handle non generated PCHs
Sometimes we start generation of PCHs but not finish it. In that case we
should redo it at the next start of the backend process. So we now
remove the old precompiled header if we add the task to the queue.
If we successfully generated the PCH it will be set again. But if we
did not it will be read from the database and set to false.

Task-number: QTCREATORBUG-22035
Change-Id: Id53c2b4e4f501fc5ef7830558085607baa6a49f1
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
2019-04-02 12:38:12 +00:00
Marco Bubke
6effa1822b Clang: Improve project part updating
The project part ids are now already created very early in the database.
This removes some checks because we can assume that an id already exists.
The project part are now completely persistent, so we can read them from
the database and compare them with new generated from a new creator
session. This should help to not recreate the same PCH again and again.

Task-number: QTCREATORBUG-21151
Change-Id: Iced818ff9f7431eaed3e37978087cc0a43b9afda
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
2019-04-01 10:31:38 +00:00
Marco Bubke
2358415b58 Clang: Move fetchPrecompiledHeader to PrecompiledHeaderStorage
It went for historical reasons in the symbol storage.

Change-Id: If05edb868901884f3951d0eb2f152566e99b4d1a
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
2019-03-04 13:40:39 +00:00
Marco Bubke
dd366b68de PchManager: Split pch tasks in project and system pch tasks
Like you can see in the task numbers this patch is touching many different
areas. So I will only touch the main parts. It is using a clang action
instead of an extra process which will be enabling the handling of
generated files in PCHs. The flags from the project part are now not
anymore transformed in a command line but they are saved in the container
semantically aware so that they can later be merged. Most of this patch is
simply polishing of other patches.

Task-number: QTCREATORBUG-21346
Task-number: QTCREATORBUG-21380
Task-number: QTCREATORBUG-21382
Task-number: QTCREATORBUG-21383
Task-number: QTCREATORBUG-21693
Task-number: QTCREATORBUG-21778
Change-Id: I9b0c02d8149b554254e819448fbc61eeaa5b7494
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
2019-01-21 15:27:10 +00:00
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
4e6d09d8e1 Clang: Reuse thread based pipeline for pch creation
The pch creation so far used signal and slots but there was no explicit
pipeline. This patch is introducing the same architecture like the
refactoring plugin. It is filtering out older project parts from the
pipeline.

Change-Id: Iaa6bd2ca1272231b97ebe1f5f7b2ce8e43bc590c
Task-number: QTCREATORBUG-21111
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
2018-09-24 14:33:05 +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