@@ -50,8 +50,6 @@ const SBAddressRange &SBAddressRange::operator=(const SBAddressRange &rhs) {
50
50
bool SBAddressRange::operator ==(const SBAddressRange &rhs) {
51
51
LLDB_INSTRUMENT_VA (this , rhs);
52
52
53
- if (!IsValid () || !rhs.IsValid ())
54
- return false ;
55
53
return m_opaque_up->operator ==(*(rhs.m_opaque_up ));
56
54
}
57
55
@@ -64,40 +62,30 @@ bool SBAddressRange::operator!=(const SBAddressRange &rhs) {
64
62
void SBAddressRange::Clear () {
65
63
LLDB_INSTRUMENT_VA (this );
66
64
67
- m_opaque_up. reset ();
65
+ m_opaque_up-> Clear ();
68
66
}
69
67
70
68
bool SBAddressRange::IsValid () const {
71
69
LLDB_INSTRUMENT_VA (this );
72
70
73
- return m_opaque_up && m_opaque_up ->IsValid ();
71
+ return m_opaque_up->IsValid ();
74
72
}
75
73
76
74
lldb::SBAddress SBAddressRange::GetBaseAddress () const {
77
75
LLDB_INSTRUMENT_VA (this );
78
76
79
- if (!IsValid ())
80
- return lldb::SBAddress ();
81
77
return lldb::SBAddress (m_opaque_up->GetBaseAddress ());
82
78
}
83
79
84
80
lldb::addr_t SBAddressRange::GetByteSize () const {
85
81
LLDB_INSTRUMENT_VA (this );
86
82
87
- if (!IsValid ())
88
- return 0 ;
89
83
return m_opaque_up->GetByteSize ();
90
84
}
91
85
92
86
bool SBAddressRange::GetDescription (SBStream &description,
93
87
const SBTarget target) {
94
88
LLDB_INSTRUMENT_VA (this , description, target);
95
89
96
- Stream &stream = description.ref ();
97
- if (!IsValid ()) {
98
- stream << " <invalid>" ;
99
- return true ;
100
- }
101
- m_opaque_up->GetDescription (&stream, target.GetSP ().get ());
102
- return true ;
90
+ return m_opaque_up->GetDescription (&description.ref (), target.GetSP ().get ());
103
91
}
0 commit comments