clang: fix precompiled preamble cache misses

Authored by brauch on Jul 25 2017, 10:49 PM.

Description

clang: fix precompiled preamble cache misses

We were a) passing in a wrong file size, and b) a different set of unsaved
files on building the translation unit as compared to invoking completion.
This resulted in the precompiled preamble being rebuilt every single time.
On my test file, time spent in clang_codeCompleteAt goes down from ~700ms
to ~12ms with this change after the project is fully parsed.

It still doesn't work in header files at all.

Differential Revision: https://phabricator.kde.org/D6905

Details

Committed
brauchJul 27 2017, 4:45 PM
Differential Revision
D6905: clang: fix precompiled preamble cache misses
Parents
R32:0e6fce2881e9: Work-around compile issue in MSVC2017
Branches
Unknown
Tags
Unknown