[PATCH] D117650: [llvm][vfs] Implement in-memory symlinks

Jan Svoboda via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jun 21 04:27:31 PDT 2022


jansvoboda11 added inline comments.


================
Comment at: llvm/lib/Support/VirtualFileSystem.cpp:1140
+    return directory_iterator(std::make_shared<InMemoryDirIterator>(
+        [&](const Twine &P) {
+          return lookupNode(P, /*FollowFinalSymlink=*/true);
----------------
We're passing a lambda here since `lookupNode` is (and should remain) private to `InMemoryFileSystem` and `InMemoryDirIterator` is in anonymous namespace so it can't be befriended. An alternative to this solution would be to pull `InMemoryDirIterator` into the `detail` namespace and forward-declare it in the friend declaration inside `InMemoryFileSystem`. I don't have strong feelings either way.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D117650/new/

https://reviews.llvm.org/D117650



More information about the llvm-commits mailing list