[PATCH] D121494: [VFS] Rename `RedirectingFileSystem::dump` to `print`

Duncan P. N. Exon Smith via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Mar 11 15:25:57 PST 2022


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

I think you didn't upload the full patch, so I think the bots will fail, but once the bots are happy this LGTM (besides one nit inline).



================
Comment at: llvm/include/llvm/Support/VirtualFileSystem.h:914
+  void print(raw_ostream &OS) const;
+  void printEntry(raw_ostream &OS, Entry *E, int NumSpaces = 0) const;
 #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
----------------
Since you didn't update callers I think you missed `git add .../VFS.cpp`.


================
Comment at: llvm/include/llvm/Support/VirtualFileSystem.h:915-917
 #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
-  LLVM_DUMP_METHOD void dump() const;
+  LLVM_DUMP_METHOD void dump() const { print(dbgs()); }
 #endif
----------------
Please leave this `print(dbgs())` in the source file to avoid needing to include a header that provides `dbgs()`. Even if it's currently available there's no reason to depend on that being the case.

Maybe you forgot to `git add .../VFS.cpp`, since as-is this would give a duplicate definition due to conflicts with the `.cpp` implementation.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D121494



More information about the llvm-commits mailing list