[PATCH] D48903: [VirtualFileSystem] InMemoryFileSystem::status: Return a Status with the requested name

Simon Marchi via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Jul 9 07:59:34 PDT 2018


simark marked 6 inline comments as done.
simark added inline comments.


================
Comment at: lib/Basic/VirtualFileSystem.cpp:488
+  }
+  StringRef getName() const { return Stat.getName(); }
   InMemoryNodeKind getKind() const { return Kind; }
----------------
ilya-biryukov wrote:
> Given that this method is inconsistent with `getStatus()` and seems to be only used in `toString` methods, maybe we could make it `protected`? Otherwise it's really easy to write code that gets the wrong path.
I now use it in `InMemoryDirIterator::setCurrentEntry`.  I will write a comment to the `getName` method to clarify this.


Repository:
  rC Clang

https://reviews.llvm.org/D48903





More information about the cfe-commits mailing list