Make an explicit GetThreadSpecNoCreate accessor so you don't have to get the const-ness right to ensure you are not making a copy of the owning breakpoint's ThreadSpec in a breakpoint location. Also change the name from NoCopy to NoCreate since that's clearer.
git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@106578 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/source/API/SBBreakpointLocation.cpp b/source/API/SBBreakpointLocation.cpp
index 206d5fd..b5e7859 100644
--- a/source/API/SBBreakpointLocation.cpp
+++ b/source/API/SBBreakpointLocation.cpp
@@ -104,7 +104,7 @@
{
tid_t sb_thread_id = (lldb::tid_t) LLDB_INVALID_THREAD_ID;
if (m_break_loc_sp)
- sb_thread_id = m_break_loc_sp->GetLocationOptions()->GetThreadSpec()->GetTID();
+ sb_thread_id = m_break_loc_sp->GetLocationOptions()->GetThreadSpecNoCreate()->GetTID();
return sb_thread_id;
}
@@ -121,7 +121,7 @@
{
if (m_break_loc_sp)
{
- const ThreadSpec *thread_spec = m_break_loc_sp->GetOptionsNoCopy()->GetThreadSpec();
+ const ThreadSpec *thread_spec = m_break_loc_sp->GetOptionsNoCreate()->GetThreadSpecNoCreate();
if (thread_spec == NULL)
return 0;
else
@@ -143,7 +143,7 @@
{
if (m_break_loc_sp)
{
- const ThreadSpec *thread_spec = m_break_loc_sp->GetOptionsNoCopy()->GetThreadSpec();
+ const ThreadSpec *thread_spec = m_break_loc_sp->GetOptionsNoCreate()->GetThreadSpecNoCreate();
if (thread_spec == NULL)
return NULL;
else
@@ -164,7 +164,7 @@
{
if (m_break_loc_sp)
{
- const ThreadSpec *thread_spec = m_break_loc_sp->GetOptionsNoCopy()->GetThreadSpec();
+ const ThreadSpec *thread_spec = m_break_loc_sp->GetOptionsNoCreate()->GetThreadSpecNoCreate();
if (thread_spec == NULL)
return NULL;
else