Skip to content

Commit 799316f

Browse files
committed
[lldb][NFC] Pass Stream& to ToXML methods in RegisterFlags
As suggested in a review of some new code for this file, Stream is more general. The code does not need to know that it's backed by a string.
1 parent 0981dca commit 799316f

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

lldb/include/lldb/Target/RegisterFlags.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515

1616
namespace lldb_private {
1717

18-
class StreamString;
18+
class Stream;
1919
class Log;
2020

2121
class RegisterFlags {
@@ -56,7 +56,7 @@ class RegisterFlags {
5656
/// Output XML that describes this field, to be inserted into a target XML
5757
/// file. Reserved characters in field names like "<" are replaced with
5858
/// their XML safe equivalents like "&gt;".
59-
void ToXML(StreamString &strm) const;
59+
void ToXML(Stream &strm) const;
6060

6161
bool operator<(const Field &rhs) const {
6262
return GetStart() < rhs.GetStart();
@@ -119,7 +119,7 @@ class RegisterFlags {
119119
std::string AsTable(uint32_t max_width) const;
120120

121121
// Output XML that describes this set of flags.
122-
void ToXML(StreamString &strm) const;
122+
void ToXML(Stream &strm) const;
123123

124124
private:
125125
const std::string m_id;

lldb/source/Target/RegisterFlags.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,7 @@ std::string RegisterFlags::AsTable(uint32_t max_width) const {
190190
return table;
191191
}
192192

193-
void RegisterFlags::ToXML(StreamString &strm) const {
193+
void RegisterFlags::ToXML(Stream &strm) const {
194194
// Example XML:
195195
// <flags id="cpsr_flags" size="4">
196196
// <field name="incorrect" start="0" end="0"/>
@@ -213,7 +213,7 @@ void RegisterFlags::ToXML(StreamString &strm) const {
213213
strm.Indent("</flags>\n");
214214
}
215215

216-
void RegisterFlags::Field::ToXML(StreamString &strm) const {
216+
void RegisterFlags::Field::ToXML(Stream &strm) const {
217217
// Example XML:
218218
// <field name="correct" start="0" end="0"/>
219219
strm.Indent();

0 commit comments

Comments
 (0)