Skip to content

Commit 4dac97e

Browse files
committed
[lldb][NFC] Migrate FileSpec::Dump to raw_ostream
1 parent 51ce067 commit 4dac97e

File tree

13 files changed

+22
-24
lines changed

13 files changed

+22
-24
lines changed

lldb/include/lldb/Utility/FileSpec.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,7 @@ class FileSpec {
211211
///
212212
/// \param[in] s
213213
/// The stream to which to dump the object description.
214-
void Dump(Stream *s) const;
214+
void Dump(llvm::raw_ostream &s) const;
215215

216216
Style GetPathStyle() const;
217217

lldb/source/Breakpoint/BreakpointLocation.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -519,7 +519,7 @@ void BreakpointLocation::GetDescription(Stream *s,
519519
if (sc.module_sp) {
520520
s->EOL();
521521
s->Indent("module = ");
522-
sc.module_sp->GetFileSpec().Dump(s);
522+
sc.module_sp->GetFileSpec().Dump(s->AsRawOstream());
523523
}
524524

525525
if (sc.comp_unit != nullptr) {

lldb/source/Commands/CommandObjectTarget.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1349,7 +1349,7 @@ static void DumpFullpath(Stream &strm, const FileSpec *file_spec_ptr,
13491349
strm.Printf("%-*s", width, fullpath.c_str());
13501350
return;
13511351
} else {
1352-
file_spec_ptr->Dump(&strm);
1352+
file_spec_ptr->Dump(strm.AsRawOstream());
13531353
return;
13541354
}
13551355
}

lldb/source/Core/FileSpecList.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ void FileSpecList::Clear() { m_files.clear(); }
4747
void FileSpecList::Dump(Stream *s, const char *separator_cstr) const {
4848
collection::const_iterator pos, end = m_files.end();
4949
for (pos = m_files.begin(); pos != end; ++pos) {
50-
pos->Dump(s);
50+
pos->Dump(s->AsRawOstream());
5151
if (separator_cstr && ((pos + 1) != end))
5252
s->PutCString(separator_cstr);
5353
}

lldb/source/Core/FormatEntity.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2310,7 +2310,7 @@ bool FormatEntity::FormatFileSpec(const FileSpec &file_spec, Stream &s,
23102310
llvm::StringRef variable_name,
23112311
llvm::StringRef variable_format) {
23122312
if (variable_name.empty() || variable_name.equals(".fullpath")) {
2313-
file_spec.Dump(&s);
2313+
file_spec.Dump(s.AsRawOstream());
23142314
return true;
23152315
} else if (variable_name.equals(".basename")) {
23162316
s.PutCString(file_spec.GetFilename().AsCString(""));

lldb/source/Core/Module.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1511,7 +1511,7 @@ bool Module::LoadScriptingResourceInTarget(Target *target, Status &error,
15111511
return false;
15121512
}
15131513
StreamString scripting_stream;
1514-
scripting_fspec.Dump(&scripting_stream);
1514+
scripting_fspec.Dump(scripting_stream.AsRawOstream());
15151515
const bool can_reload = true;
15161516
const bool init_lldb_globals = false;
15171517
bool did_load = script_interpreter->LoadScriptingModule(

lldb/source/Interpreter/OptionValueFileSpecList.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ void OptionValueFileSpecList::DumpValue(const ExecutionContext *exe_ctx,
3333
strm.Indent();
3434
strm.Printf("[%u]: ", i);
3535
}
36-
m_current_value.GetFileSpecAtIndex(i).Dump(&strm);
36+
m_current_value.GetFileSpecAtIndex(i).Dump(strm.AsRawOstream());
3737
if (one_line)
3838
strm << ' ';
3939
}

lldb/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3891,7 +3891,7 @@ void RSModuleDescriptor::Dump(Stream &strm) const {
38913891
int indent = strm.GetIndentLevel();
38923892

38933893
strm.Indent();
3894-
m_module->GetFileSpec().Dump(&strm);
3894+
m_module->GetFileSpec().Dump(strm.AsRawOstream());
38953895
strm.Indent(m_module->GetNumCompileUnits() ? "Debug info loaded."
38963896
: "Debug info does not exist.");
38973897
strm.EOL();

lldb/source/Plugins/SymbolVendor/MacOSX/SymbolVendorMacOSX.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ static bool UUIDsMatch(Module *module, ObjectFile *ofile,
4242
if (feedback_strm) {
4343
feedback_strm->PutCString(
4444
"warning: failed to get the uuid for object file: '");
45-
ofile->GetFileSpec().Dump(feedback_strm);
45+
ofile->GetFileSpec().Dump(feedback_strm->AsRawOstream());
4646
feedback_strm->PutCString("\n");
4747
}
4848
return false;
@@ -57,11 +57,11 @@ static bool UUIDsMatch(Module *module, ObjectFile *ofile,
5757
"warning: UUID mismatch detected between modules:\n ");
5858
module->GetUUID().Dump(feedback_strm);
5959
feedback_strm->PutChar(' ');
60-
module->GetFileSpec().Dump(feedback_strm);
60+
module->GetFileSpec().Dump(feedback_strm->AsRawOstream());
6161
feedback_strm->PutCString("\n ");
6262
dsym_uuid.Dump(feedback_strm);
6363
feedback_strm->PutChar(' ');
64-
ofile->GetFileSpec().Dump(feedback_strm);
64+
ofile->GetFileSpec().Dump(feedback_strm->AsRawOstream());
6565
feedback_strm->EOL();
6666
}
6767
}

lldb/source/Symbol/LineEntry.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ bool LineEntry::IsValid() const {
5151
bool LineEntry::DumpStopContext(Stream *s, bool show_fullpaths) const {
5252
if (file) {
5353
if (show_fullpaths)
54-
file.Dump(s);
54+
file.Dump(s->AsRawOstream());
5555
else
5656
file.GetFilename().Dump(s);
5757

0 commit comments

Comments
 (0)