[Lldb-commits] [PATCH] D26553: Remove weak-linked symbols for SBBreakpointListImpl

Todd Fiala via lldb-commits lldb-commits at lists.llvm.org
Fri Nov 11 11:37:58 PST 2016


tfiala created this revision.
tfiala added a reviewer: jingham.
tfiala added a subscriber: lldb-commits.

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.


https://reviews.llvm.org/D26553

Files:
  API/SBBreakpoint.cpp
  lldb/API/SBBreakpoint.h
  lldb/API/SBTarget.h


Index: API/SBBreakpoint.cpp
===================================================================
--- API/SBBreakpoint.cpp
+++ API/SBBreakpoint.cpp
@@ -712,11 +712,11 @@
 }
 
 // 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 @@
 };
 
 SBBreakpointList::SBBreakpointList(SBTarget &target)
-    : m_opaque_sp(new lldb::SBBreakpointListImpl(target)) {}
+    : m_opaque_sp(new SBBreakpointListImpl(target.GetSP())) {}
 
 SBBreakpointList::~SBBreakpointList() {}
 
Index: lldb/API/SBTarget.h
===================================================================
--- lldb/API/SBTarget.h
+++ lldb/API/SBTarget.h
@@ -819,7 +819,7 @@
 protected:
   friend class SBAddress;
   friend class SBBlock;
-  friend class SBBreakpointListImpl;
+  friend class SBBreakpointList;
   friend class SBDebugger;
   friend class SBExecutionContext;
   friend class SBFunction;
Index: lldb/API/SBBreakpoint.h
===================================================================
--- lldb/API/SBBreakpoint.h
+++ lldb/API/SBBreakpoint.h
@@ -12,6 +12,8 @@
 
 #include "lldb/API/SBDefines.h"
 
+class SBBreakpointListImpl;
+
 namespace lldb {
 
 class LLDB_API SBBreakpoint {
@@ -146,8 +148,6 @@
   lldb::BreakpointSP m_opaque_sp;
 };
 
-class SBBreakpointListImpl;
-
 class LLDB_API SBBreakpointList {
 public:
   SBBreakpointList(SBTarget &target);


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D26553.77639.patch
Type: text/x-patch
Size: 1738 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20161111/b038856d/attachment.bin>


More information about the lldb-commits mailing list