[PATCH] D79450: [VFS] Fix root directory handling in YAMLVFSWriter
Jan Korous via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue May 5 15:08:48 PDT 2020
jkorous marked 2 inline comments as done.
jkorous added inline comments.
Herald added a subscriber: ormris.
================
Comment at: llvm/lib/Support/VirtualFileSystem.cpp:2043
+
+ auto GetParentOrIfRootDir = [](StringRef Path) -> StringRef {
+ auto MaybeResult = path::parent_path(Path);
----------------
Not happy with the name - open to suggestions.
================
Comment at: llvm/lib/Support/VirtualFileSystem.cpp:2060
+ auto NewDir = GetParentOrIfRootDir(Entry.VPath);
+ assert(!NewDir.empty() && "VPath doesn't have parent directory and is "
+ "not a root directory either.");
----------------
Hmm, maybe I should just move the assert to GetParentOrIfRootDir so it's not duplicated.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D79450/new/
https://reviews.llvm.org/D79450
More information about the llvm-commits
mailing list