[PATCH] D124816: [Tooling] use different FileManager for each CWD

2022-05-06 Thread Shi Chen via Phabricator via cfe-commits
Kale updated this revision to Diff 427820. Kale added a comment. Reimplement ToolFileManager as a container of filemanagers which ToolInvocation takes by parameter. Also invalidate all file managers when using FileManager::setVirtualFileSystem(). Repository: rG LLVM Github Monorepo CHANGES

[PATCH] D124816: [Tooling] use different FileManager for each CWD

2022-05-06 Thread Shi Chen via Phabricator via cfe-commits
Kale added a comment. In D124816#3494243 , @dexonsmith wrote: > Two high-level comments: > > - Making these functions `virtual` makes it harder to reason about possible > implementations, but I don't think that's necessary for what you're doing > here.

[PATCH] D124816: [Tooling] use different FileManager for each CWD

2022-05-05 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
dexonsmith added a comment. In D124816#3494243 , @dexonsmith wrote: > - AFAICT, every call to `FileManager::setVirtualFileSystem()` is > fundamentally unsound unless the new FS is equivalent to the old one or the > filemanager hasn't been used yet. Mo

[PATCH] D124816: [Tooling] use different FileManager for each CWD

2022-05-05 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
dexonsmith added reviewers: benlangmuir, bnbarham, jansvoboda11. dexonsmith added a comment. Two high-level comments: - Making these functions `virtual` makes it harder to reason about possible implementations, but I don't think that's necessary for what you're doing here. Why not expose `ToolF

[PATCH] D124816: [Tooling] use different FileManager for each CWD

2022-05-05 Thread Shi Chen via Phabricator via cfe-commits
Kale updated this revision to Diff 427317. Kale added a comment. Format all overriding functions Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D124816/new/ https://reviews.llvm.org/D124816 Files: clang/include/clang/Basic/FileManager.h clang/in

[PATCH] D124816: [Tooling] use different FileManager for each CWD

2022-05-05 Thread Shi Chen via Phabricator via cfe-commits
Kale updated this revision to Diff 427313. Kale added a comment. Fix path in compile_commands.json for windows. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D124816/new/ https://reviews.llvm.org/D124816 Files: clang/include/clang/Basic/FileManag