Skip to content

Commit cc63ae4

Browse files
committed
[VFS] Rename RedirectingFileSystem::dump to print
The rest of LLVM uses `print` for the method taking the `raw_ostream` and `dump` only for the method with no parameters. Use the same for `RedirectingFileSystem`. Differential Revision: https://reviews.llvm.org/D121494
1 parent 9286786 commit cc63ae4

File tree

3 files changed

+11
-10
lines changed

3 files changed

+11
-10
lines changed

lldb/source/Commands/CommandObjectReproducer.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -425,7 +425,7 @@ class CommandObjectReproducerDump : public CommandObjectParsed {
425425
// Dump the VFS to a buffer.
426426
std::string str;
427427
raw_string_ostream os(str);
428-
static_cast<vfs::RedirectingFileSystem &>(*vfs).dump(os);
428+
static_cast<vfs::RedirectingFileSystem &>(*vfs).print(os);
429429
os.flush();
430430

431431
// Return the string.

llvm/include/llvm/Support/VirtualFileSystem.h

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -910,8 +910,9 @@ class RedirectingFileSystem : public vfs::FileSystem {
910910

911911
std::vector<llvm::StringRef> getRoots() const;
912912

913-
void dump(raw_ostream &OS) const;
914-
void dumpEntry(raw_ostream &OS, Entry *E, int NumSpaces = 0) const;
913+
void print(raw_ostream &OS) const;
914+
void printEntry(raw_ostream &OS, Entry *E, int NumSpaces = 0) const;
915+
915916
#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
916917
LLVM_DUMP_METHOD void dump() const;
917918
#endif

llvm/lib/Support/VirtualFileSystem.cpp

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1381,14 +1381,14 @@ std::vector<StringRef> RedirectingFileSystem::getRoots() const {
13811381
return R;
13821382
}
13831383

1384-
void RedirectingFileSystem::dump(raw_ostream &OS) const {
1384+
void RedirectingFileSystem::print(raw_ostream &OS) const {
13851385
for (const auto &Root : Roots)
1386-
dumpEntry(OS, Root.get());
1386+
printEntry(OS, Root.get());
13871387
}
13881388

1389-
void RedirectingFileSystem::dumpEntry(raw_ostream &OS,
1390-
RedirectingFileSystem::Entry *E,
1391-
int NumSpaces) const {
1389+
void RedirectingFileSystem::printEntry(raw_ostream &OS,
1390+
RedirectingFileSystem::Entry *E,
1391+
int NumSpaces) const {
13921392
StringRef Name = E->getName();
13931393
for (int i = 0, e = NumSpaces; i < e; ++i)
13941394
OS << " ";
@@ -1401,12 +1401,12 @@ void RedirectingFileSystem::dumpEntry(raw_ostream &OS,
14011401

14021402
for (std::unique_ptr<Entry> &SubEntry :
14031403
llvm::make_range(DE->contents_begin(), DE->contents_end()))
1404-
dumpEntry(OS, SubEntry.get(), NumSpaces + 2);
1404+
printEntry(OS, SubEntry.get(), NumSpaces + 2);
14051405
}
14061406
}
14071407

14081408
#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
1409-
LLVM_DUMP_METHOD void RedirectingFileSystem::dump() const { dump(dbgs()); }
1409+
void RedirectingFileSystem::dump() const { print(dbgs()); }
14101410
#endif
14111411

14121412
/// A helper class to hold the common YAML parsing state.

0 commit comments

Comments
 (0)