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

Ilya Biryukov via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Jul 10 07:23:52 PDT 2018


ilya-biryukov accepted this revision.
ilya-biryukov added a comment.
This revision is now accepted and ready to land.

LGTM if that does not introduce any regressions in clang and clang-tools.



================
Comment at: lib/Basic/VirtualFileSystem.cpp:770
+    if (I != E) {
+      SmallString<32> Path(RequestedDirName);
+      llvm::sys::path::append(Path, I->second->getFileName());
----------------
NIT: maybe increase the size to 256? This could save an extra allocation in some cases, and hopefully won't be expensive, stack allocs are cheap in most cases.


Repository:
  rC Clang

https://reviews.llvm.org/D48903





More information about the cfe-commits mailing list