voskresensky.vladimir added a comment. In https://reviews.llvm.org/D54547#1301359, @erichkeane wrote:
> > I thought clang-d service is using it to speed up indexing. > > Presumably, I could also just make PTH use another bit or two for the TokenID > and it would work fine. However, when I mentioned this on IRC the general > response was that it is a 'failed experiment'. In your use case, I wonder > why you couldn't just use PCH and get even further performance improvements? To be fair, I don't remember exactly. :-) I remember we shared the same PTH for all C and C++ files and built some preprocessor-based features for incomplete code written in editor based on that. Hmm... One more thing I had to fix was: lex in mode where we emit all preprocessor tokens there as well (like "#define MACRO A" => #, define, MACRO, A) PHT was also used for rebuilding PCH, when something is changed. Because often single changed file can completely invalidate PCH, while PTH just contain pp-lexed tokens which doesn't carry semantic. So, PTHManager could skip providing tokens for changed file, but keep proved them for all other files. https://reviews.llvm.org/D54547 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits