Re-enabled LLDB's pointer checkers, and moved the
implementation of the Objective-C object checkers
into the Objective-C language runtime.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@118226 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/source/Target/ThreadPlanCallFunction.cpp b/source/Target/ThreadPlanCallFunction.cpp
index 65349dd..85de672 100644
--- a/source/Target/ThreadPlanCallFunction.cpp
+++ b/source/Target/ThreadPlanCallFunction.cpp
@@ -150,6 +150,17 @@
 
 ThreadPlanCallFunction::~ThreadPlanCallFunction ()
 {
+    if (m_valid && !IsPlanComplete())
+        DoTakedown();
+}
+
+void
+ThreadPlanCallFunction::DoTakedown ()
+{
+    m_thread.RestoreSaveFrameZero(m_register_backup);
+    m_thread.ClearStackFrames();
+    SetPlanComplete();
+    ClearBreakpoints();
 }
 
 void
@@ -253,11 +264,8 @@
             }
         }
         
-        m_thread.RestoreSaveFrameZero(m_register_backup);
-        m_thread.ClearStackFrames();
-        SetPlanComplete();
+        DoTakedown();
         
-        ClearBreakpoints();
         return true;
     }
     else