[Lldb-commits] [lldb] r173865 - Remove debug code and commented out code that was left in.

Greg Clayton gclayton at apple.com
Tue Jan 29 16:29:53 PST 2013


Author: gclayton
Date: Tue Jan 29 18:29:53 2013
New Revision: 173865

URL: http://llvm.org/viewvc/llvm-project?rev=173865&view=rev
Log:
Remove debug code and commented out code that was left in.


Modified:
    lldb/trunk/include/lldb/Core/Timer.h
    lldb/trunk/source/Target/ObjCLanguageRuntime.cpp

Modified: lldb/trunk/include/lldb/Core/Timer.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Core/Timer.h?rev=173865&r1=173864&r2=173865&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Core/Timer.h (original)
+++ lldb/trunk/include/lldb/Core/Timer.h Tue Jan 29 18:29:53 2013
@@ -91,49 +91,6 @@ private:
     Timer();
     DISALLOW_COPY_AND_ASSIGN (Timer);
 };
-
-    class ScopedTimer
-    {
-    public:
-        ScopedTimer() :
-            m_start (TimeValue::Now())
-        {
-        }
-        
-        uint64_t
-        GetElapsedNanoSeconds() const
-        {
-            return TimeValue::Now() - m_start;
-        }
-
-    protected:
-        TimeValue m_start;
-    };
-    
-    class ScopedTimerAggregator
-    {
-    public:
-        ScopedTimerAggregator(const char *desc) :
-            m_description (desc),
-            m_total_nsec()
-        {
-        }
-        
-        ~ScopedTimerAggregator()
-        {
-            printf ("Total nsec spent in %s is %llu\n", m_description.c_str(), m_total_nsec);
-        }
-        void
-        Aggregate (const ScopedTimer &scoped_timer)
-        {
-            m_total_nsec += scoped_timer.GetElapsedNanoSeconds();
-        }
-        
-    protected:
-        std::string m_description;
-        uint64_t m_total_nsec;
-    };
-
     
 } // namespace lldb_private
 

Modified: lldb/trunk/source/Target/ObjCLanguageRuntime.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Target/ObjCLanguageRuntime.cpp?rev=173865&r1=173864&r2=173865&view=diff
==============================================================================
--- lldb/trunk/source/Target/ObjCLanguageRuntime.cpp (original)
+++ lldb/trunk/source/Target/ObjCLanguageRuntime.cpp Tue Jan 29 18:29:53 2013
@@ -411,98 +411,6 @@ ObjCLanguageRuntime::MethodName::GetFull
 }
 
 
-//uint32_t
-//ObjCLanguageRuntime::ParseMethodName (const char *name, 
-//                                      ConstString *class_name,              // Class name (with category if any)
-//                                      ConstString *selector_name,           // selector on its own
-//                                      ConstString *name_sans_category,      // Full function prototype with no category
-//                                      ConstString *class_name_sans_category)// Class name with no category (or empty if no category as answer will be in "class_name"
-//{
-//    static ScopedTimerAggregator g_scoped_timer_aggregator ("ObjCLanguageRuntime::ParseMethodName");
-//    ScopedTimer scoped_timer;
-//    uint32_t result = 0;
-//    if (class_name)
-//        class_name->Clear();
-//    if (selector_name)
-//        selector_name->Clear();
-//    if (name_sans_category)
-//        name_sans_category->Clear();
-//    if (class_name_sans_category)
-//        class_name_sans_category->Clear();
-//    
-//
-//    if (IsPossibleObjCMethodName (name))
-//    {
-//        int name_len = strlen (name);
-//        // Objective C methods must have at least:
-//        //      "-[" or "+[" prefix
-//        //      One character for a class name
-//        //      One character for the space between the class name
-//        //      One character for the method name
-//        //      "]" suffix
-//        if (name_len >= 6 && name[name_len - 1] == ']')
-//        {
-//            const char *selector_name_ptr = strchr (name, ' ');
-//            if (selector_name_ptr)
-//            {
-//                if (class_name)
-//                {
-//                    class_name->SetCStringWithLength (name + 2, selector_name_ptr - name - 2);
-//                    ++result;
-//                }    
-//                
-//                // Skip the space
-//                ++selector_name_ptr;
-//                // Extract the objective C basename and add it to the
-//                // accelerator tables
-//                size_t selector_name_len = name_len - (selector_name_ptr - name) - 1;
-//                if (selector_name)
-//                {
-//                    selector_name->SetCStringWithLength (selector_name_ptr, selector_name_len);                                
-//                    ++result;
-//                }
-//                
-//                // Also see if this is a "category" on our class.  If so strip off the category name,
-//                // and add the class name without it to the basename table. 
-//                
-//                if (name_sans_category || class_name_sans_category)
-//                {
-//                    const char *open_paren = strchr (name, '(');
-//                    if (open_paren)
-//                    {
-//                        if (class_name_sans_category)
-//                        {
-//                            class_name_sans_category->SetCStringWithLength (name + 2, open_paren - name - 2);
-//                            ++result;
-//                        }
-//                        
-//                        if (name_sans_category)
-//                        {
-//                            const char *close_paren = strchr (open_paren, ')');
-//                            if (open_paren < close_paren)
-//                            {
-//                                std::string buffer (name, open_paren - name);
-//                                buffer.append (close_paren + 1);
-//                                name_sans_category->SetCString (buffer.c_str());
-//                                ++result;
-//                            }
-//                        }
-//                    }
-//                }
-//            }
-//        }
-//    }
-//    ObjCLanguageRuntime::MethodName method_name(name, true);
-//    if (class_name)
-//        assert (*class_name == method_name.GetClassNameWithCategory());
-//    if (selector_name)
-//        assert (*selector_name == method_name.GetSelector());
-//    if (class_name_sans_category)
-//        assert (*class_name_sans_category == method_name.GetClassName());
-//    g_scoped_timer_aggregator.Aggregate (scoped_timer);
-//    return result;
-//}
-
 bool
 ObjCLanguageRuntime::ClassDescriptor::IsPointerValid (lldb::addr_t value,
                                                       uint32_t ptr_size,





More information about the lldb-commits mailing list