about summary refs log tree commit diff
path: root/src/rustllvm/rustllvm.h
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2017-12-01 16:01:22 +0000
committerbors <bors@rust-lang.org>2017-12-01 16:01:22 +0000
commit6805b016efdfcd99e706003fab1336df73f6811b (patch)
treec629f376a62d81699c34474832c66e6e7c21df95 /src/rustllvm/rustllvm.h
parente3ed21272d5f50c37c09f2a7f06c40f56b6ac298 (diff)
parent966eead9ec4d95f887d1eb5d0fc4b72b5779e952 (diff)
downloadrust-6805b016efdfcd99e706003fab1336df73f6811b.tar.gz
rust-6805b016efdfcd99e706003fab1336df73f6811b.zip
Auto merge of #46338 - michaelwoerister:lazy-diagnostics, r=nikomatsakis
incr.comp.: Load cached diagnostics lazily and allow more things in the cache.

This PR implements makes two changes:
1. Diagnostics are loaded lazily from the incr. comp. cache now. This turned out to be necessary for correctness because diagnostics contain `Span` values and deserializing those requires that the source file they point to is still around in the current compilation session. Obviously this isn't always the case. Loading them lazily allows for never touching diagnostics that are not valid anymore.
2. The compiler can now deal with there being no cache entry for a given query invocation. Before, all query results of a cacheable query were always expected to be present in the cache. Now, the compiler can fall back to re-computing the result if there is no cache entry found. This allows for caching things that we cannot force from dep-node (like the `symbol_name` query). In such a case we'll just have a "best effort" caching strategy.

~~This PR is based on https://github.com/rust-lang/rust/pull/46301 (=first 2 commits), so please don't merge until that has landed. The rest of the commits are ready for review though.~~

r? @nikomatsakis
Diffstat (limited to 'src/rustllvm/rustllvm.h')
0 files changed, 0 insertions, 0 deletions