Add an API to SBDebugger class:

    bool SBDebugger::DeleteTarget(lldb::SBTarget &target);

which is used in the test tearDown() phase to cleanup the debugger's target list
so that it won't grow larger and larger as test cases are executed.  This is also
a good opportunity to get rid of the arcane requirement that test cases exercising
the Python API must assign the process object to self.process so that it gets
shutdown gracefully.  Instead, the shutdown of the process associated with each
target is now being now automatically.

Also get rid of an API from SBTarget class:

    SBTarget::DeleteTargetFromList(lldb_private::TargetList *list);


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@133091 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/source/API/SBDebugger.cpp b/source/API/SBDebugger.cpp
index 33f9760..04d8f72 100644
--- a/source/API/SBDebugger.cpp
+++ b/source/API/SBDebugger.cpp
@@ -508,6 +508,24 @@
     return target;
 }
 
+bool
+SBDebugger::DeleteTarget (lldb::SBTarget &target)
+{
+    bool result = false;
+    if (m_opaque_sp)
+    {
+        // No need to lock, the target list is thread safe
+        result = m_opaque_sp->GetTargetList().DeleteTarget (target.m_opaque_sp);
+    }
+
+    LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
+    if (log)
+    {
+        log->Printf ("SBDebugger(%p)::DeleteTarget (SBTarget(%p)) => %i", m_opaque_sp.get(), target.m_opaque_sp.get(), result);
+    }
+
+    return result;
+}
 SBTarget
 SBDebugger::GetTargetAtIndex (uint32_t idx)
 {
diff --git a/source/API/SBTarget.cpp b/source/API/SBTarget.cpp
index ab70e6c..629308f 100644
--- a/source/API/SBTarget.cpp
+++ b/source/API/SBTarget.cpp
@@ -397,16 +397,6 @@
     return exe_file_spec;
 }
 
-
-bool
-SBTarget::DeleteTargetFromList (TargetList *list)
-{
-    if (m_opaque_sp)
-        return list->DeleteTarget (m_opaque_sp);
-    else
-        return false;
-}
-
 bool
 SBTarget::operator == (const SBTarget &rhs) const
 {