This commit does two things.  One, it converts the return value of the QueueThreadPlanXXX 
plan providers from a "ThreadPlan *" to a "lldb::ThreadPlanSP".  That was needed to fix
a bug where the ThreadPlanStepInRange wasn't checking with its sub-plans to make sure they
succeed before trying to proceed further.  If the sub-plan failed and as a result didn't make
any progress, you could end up retrying the same failing algorithm in an infinite loop.

<rdar://problem/14043602>

llvm-svn: 186618
diff --git a/lldb/source/Target/ThreadPlanShouldStopHere.cpp b/lldb/source/Target/ThreadPlanShouldStopHere.cpp
index 71543ae..8766234 100644
--- a/lldb/source/Target/ThreadPlanShouldStopHere.cpp
+++ b/lldb/source/Target/ThreadPlanShouldStopHere.cpp
@@ -45,21 +45,21 @@
     m_baton = baton;
 }
 
-ThreadPlan *
+ThreadPlanSP
 ThreadPlanShouldStopHere::InvokeShouldStopHereCallback ()
 {
     if (m_callback)
     {
-        ThreadPlan *return_plan = m_callback (m_owner, m_flags, m_baton);
+        ThreadPlanSP return_plan_sp(m_callback (m_owner, m_flags, m_baton));
         Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_STEP));
         if (log)
         {
             lldb::addr_t current_addr = m_owner->GetThread().GetRegisterContext()->GetPC(0);
 
-            if (return_plan)
+            if (return_plan_sp)
             {
                 StreamString s;
-                return_plan->GetDescription (&s, lldb::eDescriptionLevelFull);
+                return_plan_sp->GetDescription (&s, lldb::eDescriptionLevelFull);
                 log->Printf ("ShouldStopHere callback found a step out plan from 0x%" PRIx64 ": %s.", current_addr, s.GetData());
             }
             else
@@ -67,8 +67,8 @@
                 log->Printf ("ShouldStopHere callback didn't find a step out plan from: 0x%" PRIx64 ".", current_addr);
             }
         }
-        return return_plan;
+        return return_plan_sp;
     }
     else
-        return NULL;
+        return ThreadPlanSP();
 }