Skip to content

Commit 777d1f7

Browse files
committed
[lldb] Migrate VMRange::Dump to raw_ostream
1 parent 0d2472f commit 777d1f7

File tree

4 files changed

+8
-10
lines changed

4 files changed

+8
-10
lines changed

lldb/include/lldb/Utility/VMRange.h

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,12 @@
1010
#define liblldb_VMRange_h_
1111

1212
#include "lldb/lldb-types.h"
13+
#include "llvm/Support/raw_ostream.h"
1314

1415
#include <stddef.h>
1516
#include <stdint.h>
1617
#include <vector>
1718

18-
namespace lldb_private {
19-
class Stream;
20-
}
21-
2219
namespace lldb_private {
2320

2421
// A vm address range. These can represent offsets ranges or actual
@@ -81,7 +78,7 @@ class VMRange {
8178
return false;
8279
}
8380

84-
void Dump(Stream *s, lldb::addr_t base_addr = 0,
81+
void Dump(llvm::raw_ostream &s, lldb::addr_t base_addr = 0,
8582
uint32_t addr_width = 8) const;
8683

8784
static bool ContainsValue(const VMRange::collection &coll,

lldb/source/Core/Section.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -323,7 +323,7 @@ void Section::Dump(Stream *s, Target *target, uint32_t depth) const {
323323
}
324324

325325
VMRange range(addr, addr + m_byte_size);
326-
range.Dump(s, 0);
326+
range.Dump(s->AsRawOstream(), 0);
327327
}
328328

329329
s->Printf("%c %c%c%c 0x%8.8" PRIx64 " 0x%8.8" PRIx64 " 0x%8.8x ",

lldb/source/Expression/DWARFExpression.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ void DWARFExpression::GetDescription(Stream *s, lldb::DescriptionLevel level,
131131
s->PutCString(", ");
132132
VMRange addr_range(curr_base_addr + begin_addr_offset,
133133
curr_base_addr + end_addr_offset);
134-
addr_range.Dump(s, 0, 8);
134+
addr_range.Dump(s->AsRawOstream(), 0, 8);
135135
s->PutChar('{');
136136
lldb::offset_t location_length = m_data.GetU16(&offset);
137137
DumpLocation(s, offset, location_length, level, abi);

lldb/source/Utility/VMRange.cpp

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,10 @@ bool VMRange::ContainsRange(const VMRange::collection &coll,
3535
}) != coll.end();
3636
}
3737

38-
void VMRange::Dump(Stream *s, lldb::addr_t offset, uint32_t addr_width) const {
39-
DumpAddressRange(s->AsRawOstream(), offset + GetBaseAddress(),
40-
offset + GetEndAddress(), addr_width);
38+
void VMRange::Dump(llvm::raw_ostream &s, lldb::addr_t offset,
39+
uint32_t addr_width) const {
40+
DumpAddressRange(s, offset + GetBaseAddress(), offset + GetEndAddress(),
41+
addr_width);
4142
}
4243

4344
bool lldb_private::operator==(const VMRange &lhs, const VMRange &rhs) {

0 commit comments

Comments
 (0)