forked from OSchip/llvm-project
Tiny refactoring to use member functions instead of directly accessing member fields.
llvm-svn: 148743
This commit is contained in:
parent
820417af07
commit
fab7a91d92
|
@ -70,7 +70,10 @@ public:
|
|||
}
|
||||
|
||||
void
|
||||
IncrementHitCount ();
|
||||
IncrementHitCount ()
|
||||
{
|
||||
++m_hit_count;
|
||||
}
|
||||
|
||||
uint32_t
|
||||
GetHardwareIndex () const
|
||||
|
|
|
@ -212,12 +212,12 @@ BreakpointLocation::ShouldStop (StoppointCallbackContext *context)
|
|||
bool should_stop = true;
|
||||
LogSP log = lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_BREAKPOINTS);
|
||||
|
||||
m_hit_count++;
|
||||
IncrementHitCount();
|
||||
|
||||
if (!IsEnabled())
|
||||
return false;
|
||||
|
||||
if (m_hit_count <= GetIgnoreCount())
|
||||
if (GetHitCount() <= GetIgnoreCount())
|
||||
return false;
|
||||
|
||||
// We only run synchronous callbacks in ShouldStop:
|
||||
|
|
|
@ -61,7 +61,7 @@ BreakpointSite::GetNextID()
|
|||
bool
|
||||
BreakpointSite::ShouldStop (StoppointCallbackContext *context)
|
||||
{
|
||||
m_hit_count++;
|
||||
IncrementHitCount();
|
||||
return m_owners.ShouldStop (context);
|
||||
}
|
||||
|
||||
|
|
|
@ -66,7 +66,8 @@ Watchpoint::SetDeclInfo (std::string &str)
|
|||
return;
|
||||
}
|
||||
|
||||
|
||||
// Override default impl of StoppointLocation::IsHardware() since m_is_hardware
|
||||
// member field is more accurate.
|
||||
bool
|
||||
Watchpoint::IsHardware () const
|
||||
{
|
||||
|
@ -79,12 +80,12 @@ Watchpoint::IsHardware () const
|
|||
bool
|
||||
Watchpoint::ShouldStop (StoppointCallbackContext *context)
|
||||
{
|
||||
++m_hit_count;
|
||||
IncrementHitCount();
|
||||
|
||||
if (!IsEnabled())
|
||||
return false;
|
||||
|
||||
if (m_hit_count <= GetIgnoreCount())
|
||||
if (GetHitCount() <= GetIgnoreCount())
|
||||
return false;
|
||||
|
||||
return true;
|
||||
|
|
Loading…
Reference in New Issue