[PATCH] D51641: [VFS] Cache the current working directory for the real FS.
Eric Liu via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Sep 4 10:17:50 PDT 2018
ioeric added inline comments.
================
Comment at: lib/Basic/VirtualFileSystem.cpp:275
return EC;
- return Dir.str().str();
+ CWDCache = Dir.str();
+ return CWDCache;
----------------
sammccall wrote:
> Doesn't this need to be guarded by a lock? I know the current version is thread-hostile in principle but this seems likely to lead to corruption in multithreaded programs.
> (I suspect clangd tests would fail under TSan for example)
Done. Thanks for the catch!
Repository:
rC Clang
https://reviews.llvm.org/D51641
More information about the cfe-commits
mailing list