Remove weak-linked symbols for SBBreakpointListImpl
authorTodd Fiala <todd.fiala@gmail.com>
Fri, 11 Nov 2016 21:06:40 +0000 (21:06 +0000)
committerTodd Fiala <todd.fiala@gmail.com>
Fri, 11 Nov 2016 21:06:40 +0000 (21:06 +0000)
Summary:
Similar to SBStructuredData's Impl class, SBBreakpointListImpl was
getting weak-link exported in the lldb namespace. This change list fixes
that by moving out of the lldb public namespace, which removes it from
public export visibility.

Fixes:
rdar://28960344

Reviewers: jingham

Subscribers: lldb-commits

Differential Revision: https://reviews.llvm.org/D26553

llvm-svn: 286631

lldb/include/lldb/API/SBBreakpoint.h
lldb/include/lldb/API/SBTarget.h
lldb/source/API/SBBreakpoint.cpp

index 7924229..56509c9 100644 (file)
@@ -12,6 +12,8 @@
 
 #include "lldb/API/SBDefines.h"
 
+class SBBreakpointListImpl;
+
 namespace lldb {
 
 class LLDB_API SBBreakpoint {
@@ -146,8 +148,6 @@ private:
   lldb::BreakpointSP m_opaque_sp;
 };
 
-class SBBreakpointListImpl;
-
 class LLDB_API SBBreakpointList {
 public:
   SBBreakpointList(SBTarget &target);
index a4503ae..4e8db83 100644 (file)
@@ -819,7 +819,7 @@ public:
 protected:
   friend class SBAddress;
   friend class SBBlock;
-  friend class SBBreakpointListImpl;
+  friend class SBBreakpointList;
   friend class SBDebugger;
   friend class SBExecutionContext;
   friend class SBFunction;
index 8b05156..0eab2c2 100644 (file)
@@ -712,11 +712,11 @@ SBBreakpoint::GetNumBreakpointLocationsFromEvent(const lldb::SBEvent &event) {
 }
 
 // This is simple collection of breakpoint id's and their target.
-class lldb::SBBreakpointListImpl {
+class SBBreakpointListImpl {
 public:
-  SBBreakpointListImpl(SBTarget &target) : m_target_wp() {
-    if (target.IsValid())
-      m_target_wp = target.GetSP();
+  SBBreakpointListImpl(lldb::TargetSP target_sp) : m_target_wp() {
+    if (target_sp && target_sp->IsValid())
+      m_target_wp = target_sp;
   }
 
   ~SBBreakpointListImpl() = default;
@@ -796,7 +796,7 @@ private:
 };
 
 SBBreakpointList::SBBreakpointList(SBTarget &target)
-    : m_opaque_sp(new lldb::SBBreakpointListImpl(target)) {}
+    : m_opaque_sp(new SBBreakpointListImpl(target.GetSP())) {}
 
 SBBreakpointList::~SBBreakpointList() {}