Revert "Revert r366458, r366467 and r366468"
This reverts commit 9c377105da0be7c2c9a3c70035ce674c71b846af.
[clangd][BackgroundIndexLoader] Directly store DependentTU while loading shard
Summary:
We were deferring the population of DependentTU field in LoadedShard
until BackgroundIndexLoader was consumed. This actually triggers a use after
free since the shards FileToTU was pointing at could've been moved while
consuming the Loader.
Reviewers: sammccall
Subscribers: ilya-biryukov, MaskRay, jkorous, arphaman, cfe-commits
Tags: #clang
Differential Revision: https://reviews.llvm.org/D64980
git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@366559 91177308-0d34-0410-b5e6-96231b3b80d8
15 files changed