diff --git a/lldb/include/lldb/Utility/VMRange.h b/lldb/include/lldb/Utility/VMRange.h index 9c2f9d090919..72f859b67582 100644 --- a/lldb/include/lldb/Utility/VMRange.h +++ b/lldb/include/lldb/Utility/VMRange.h @@ -10,15 +10,12 @@ #define liblldb_VMRange_h_ #include "lldb/lldb-types.h" +#include "llvm/Support/raw_ostream.h" #include #include #include -namespace lldb_private { -class Stream; -} - namespace lldb_private { // A vm address range. These can represent offsets ranges or actual @@ -81,7 +78,7 @@ public: return false; } - void Dump(Stream *s, lldb::addr_t base_addr = 0, + void Dump(llvm::raw_ostream &s, lldb::addr_t base_addr = 0, uint32_t addr_width = 8) const; static bool ContainsValue(const VMRange::collection &coll, diff --git a/lldb/source/Core/Section.cpp b/lldb/source/Core/Section.cpp index e8fcca4603df..4a9acab2e27c 100644 --- a/lldb/source/Core/Section.cpp +++ b/lldb/source/Core/Section.cpp @@ -323,7 +323,7 @@ void Section::Dump(Stream *s, Target *target, uint32_t depth) const { } VMRange range(addr, addr + m_byte_size); - range.Dump(s, 0); + range.Dump(s->AsRawOstream(), 0); } s->Printf("%c %c%c%c 0x%8.8" PRIx64 " 0x%8.8" PRIx64 " 0x%8.8x ", diff --git a/lldb/source/Expression/DWARFExpression.cpp b/lldb/source/Expression/DWARFExpression.cpp index df31d15e7d59..1297255a38be 100644 --- a/lldb/source/Expression/DWARFExpression.cpp +++ b/lldb/source/Expression/DWARFExpression.cpp @@ -131,7 +131,7 @@ void DWARFExpression::GetDescription(Stream *s, lldb::DescriptionLevel level, s->PutCString(", "); VMRange addr_range(curr_base_addr + begin_addr_offset, curr_base_addr + end_addr_offset); - addr_range.Dump(s, 0, 8); + addr_range.Dump(s->AsRawOstream(), 0, 8); s->PutChar('{'); lldb::offset_t location_length = m_data.GetU16(&offset); DumpLocation(s, offset, location_length, level, abi); diff --git a/lldb/source/Utility/VMRange.cpp b/lldb/source/Utility/VMRange.cpp index e7c6b0bcccbb..c8c3334138d3 100644 --- a/lldb/source/Utility/VMRange.cpp +++ b/lldb/source/Utility/VMRange.cpp @@ -35,9 +35,10 @@ bool VMRange::ContainsRange(const VMRange::collection &coll, }) != coll.end(); } -void VMRange::Dump(Stream *s, lldb::addr_t offset, uint32_t addr_width) const { - DumpAddressRange(s->AsRawOstream(), offset + GetBaseAddress(), - offset + GetEndAddress(), addr_width); +void VMRange::Dump(llvm::raw_ostream &s, lldb::addr_t offset, + uint32_t addr_width) const { + DumpAddressRange(s, offset + GetBaseAddress(), offset + GetEndAddress(), + addr_width); } bool lldb_private::operator==(const VMRange &lhs, const VMRange &rhs) {