[clang][deps] Fix race condition
authorJan Svoboda <jan_svoboda@apple.com>
Mon, 6 Feb 2023 19:36:51 +0000 (11:36 -0800)
committerJan Svoboda <jan_svoboda@apple.com>
Tue, 7 Feb 2023 17:26:56 +0000 (09:26 -0800)
commit152f2914607ffe632202ee660208d6dfba6c8870
tree40f5774c27cb5730af9b276297f39ab8ba983247
parent140bc411b245260680d90fd981635317b261ef0e
[clang][deps] Fix race condition

D140176 introduced new `FullDeps` API that's not thread-safe, breaking the class invariant. This was causing race condition when `clang-scan-deps` was run with multiple threads.

Reviewed By: steven_wu, akyrtzi

Differential Revision: https://reviews.llvm.org/D143428
clang/tools/clang-scan-deps/ClangScanDeps.cpp