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/Breakpoint/BreakpointOptions.cpp b/source/Breakpoint/BreakpointOptions.cpp
index c362514..fae9a7b 100644
--- a/source/Breakpoint/BreakpointOptions.cpp
+++ b/source/Breakpoint/BreakpointOptions.cpp
@@ -173,7 +173,7 @@
}
const ThreadSpec *
-BreakpointOptions::GetThreadSpec () const
+BreakpointOptions::GetThreadSpecNoCreate () const
{
return m_thread_spec_ap.get();
}
@@ -200,7 +200,7 @@
// Figure out if there are any options not at their default value, and only print
// anything if there are:
- if (m_ignore_count != 0 || !m_enabled || (GetThreadSpec() != NULL && GetThreadSpec()->HasSpecification ()))
+ if (m_ignore_count != 0 || !m_enabled || (GetThreadSpecNoCreate() != NULL && GetThreadSpecNoCreate()->HasSpecification ()))
{
if (level == lldb::eDescriptionLevelVerbose)
{