@@ -37,24 +37,7 @@ namespace lldb
37
37
{
38
38
class SBBreakpointNameImpl {
39
39
public:
40
- SBBreakpointNameImpl (SBTarget &sb_target, const char *name)
41
- {
42
- if (!name || name[0 ] == ' \0 ' )
43
- return ;
44
- m_name.assign (name);
45
-
46
- if (!sb_target.IsValid ())
47
- return ;
48
-
49
- TargetSP target_sp = sb_target.GetSP ();
50
- if (!target_sp)
51
- return ;
52
-
53
- m_target_wp = target_sp;
54
- }
55
-
56
- SBBreakpointNameImpl (TargetSP target_sp, const char *name)
57
- {
40
+ SBBreakpointNameImpl (TargetSP target_sp, const char *name) {
58
41
if (!name || name[0 ] == ' \0 ' )
59
42
return ;
60
43
m_name.assign (name);
@@ -64,16 +47,11 @@ class SBBreakpointNameImpl {
64
47
65
48
m_target_wp = target_sp;
66
49
}
67
-
68
- bool operator ==(const SBBreakpointNameImpl &rhs) {
69
- return m_name == rhs.m_name
70
- && m_target_wp.lock () == rhs.m_target_wp .lock ();
71
- }
72
-
73
- bool operator !=(const SBBreakpointNameImpl &rhs) {
74
- return m_name != rhs.m_name
75
- || m_target_wp.lock () != rhs.m_target_wp .lock ();
76
- }
50
+
51
+ SBBreakpointNameImpl (SBTarget &sb_target, const char *name);
52
+ bool operator ==(const SBBreakpointNameImpl &rhs);
53
+ bool operator !=(const SBBreakpointNameImpl &rhs);
54
+
77
55
// For now we take a simple approach and only keep the name, and relook
78
56
// up the location when we need it.
79
57
@@ -88,33 +66,48 @@ class SBBreakpointNameImpl {
88
66
bool IsValid () const {
89
67
return !m_name.empty () && m_target_wp.lock ();
90
68
}
91
-
92
- lldb_private::BreakpointName *GetBreakpointName ()
93
- {
94
- if (!IsValid ())
95
- return nullptr ;
96
- TargetSP target_sp = GetTarget ();
97
- if (!target_sp)
98
- return nullptr ;
99
- Status error;
100
- return target_sp->FindBreakpointName (ConstString (m_name), true , error);
101
- }
102
-
103
- const lldb_private::BreakpointName *GetBreakpointName () const
104
- {
105
- if (!IsValid ())
106
- return nullptr ;
107
- TargetSP target_sp = GetTarget ();
108
- if (!target_sp)
109
- return nullptr ;
110
- Status error;
111
- return target_sp->FindBreakpointName (ConstString (m_name), true , error);
112
- }
113
-
69
+
70
+ lldb_private::BreakpointName *GetBreakpointName () const ;
71
+
114
72
private:
115
73
TargetWP m_target_wp;
116
74
std::string m_name;
117
75
};
76
+
77
+ SBBreakpointNameImpl::SBBreakpointNameImpl (SBTarget &sb_target,
78
+ const char *name) {
79
+ if (!name || name[0 ] == ' \0 ' )
80
+ return ;
81
+ m_name.assign (name);
82
+
83
+ if (!sb_target.IsValid ())
84
+ return ;
85
+
86
+ TargetSP target_sp = sb_target.GetSP ();
87
+ if (!target_sp)
88
+ return ;
89
+
90
+ m_target_wp = target_sp;
91
+ }
92
+
93
+ bool SBBreakpointNameImpl::operator ==(const SBBreakpointNameImpl &rhs) {
94
+ return m_name == rhs.m_name && m_target_wp.lock () == rhs.m_target_wp .lock ();
95
+ }
96
+
97
+ bool SBBreakpointNameImpl::operator !=(const SBBreakpointNameImpl &rhs) {
98
+ return m_name != rhs.m_name || m_target_wp.lock () != rhs.m_target_wp .lock ();
99
+ }
100
+
101
+ lldb_private::BreakpointName *SBBreakpointNameImpl::GetBreakpointName () const {
102
+ if (!IsValid ())
103
+ return nullptr ;
104
+ TargetSP target_sp = GetTarget ();
105
+ if (!target_sp)
106
+ return nullptr ;
107
+ Status error;
108
+ return target_sp->FindBreakpointName (ConstString (m_name), true , error);
109
+ }
110
+
118
111
} // namespace lldb
119
112
120
113
SBBreakpointName::SBBreakpointName () {}
0 commit comments