[PATCH] D79809: [YAMLVFSWriter] Fix for delimiters

Jonas Devlieghere via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue May 12 15:37:42 PDT 2020


JDevlieghere accepted this revision.
JDevlieghere added a comment.
This revision is now accepted and ready to land.

Thank you for fixing this Jan. I ran the LLDB reproducer test suite and everything passes.



================
Comment at: llvm/lib/Support/VirtualFileSystem.cpp:2043
 
-    if (!first_entry_is_directory)
+    bool IsCurrentDirEmpty = true;
+    if (!Entry.IsDirectory) {
----------------
So this is set to true whenever we start a new directory, and is set to false whenever we write a file entry. Would it make sense to make this variable a member and toggle it inside `startDirectory ` and `writeEntry` respectively?


================
Comment at: llvm/lib/Support/VirtualFileSystem.cpp:2057
       } else {
+        bool HaveWePoppedDirStack = false;
         while (!DirStack.empty() && !containedIn(DirStack.back(), Dir)) {
----------------
Not a fan of this name. What about `IsDirPoppedFromStack`?


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

https://reviews.llvm.org/D79809





More information about the llvm-commits mailing list