mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2024-11-30 17:21:10 +00:00
Remove debug code and commented out code that was left in.
llvm-svn: 173865
This commit is contained in:
parent
8bc6534701
commit
325e869463
@ -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
|
||||
|
||||
|
@ -411,98 +411,6 @@ ObjCLanguageRuntime::MethodName::GetFullNames (std::vector<ConstString> &names,
|
||||
}
|
||||
|
||||
|
||||
//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,
|
||||
|
Loading…
Reference in New Issue
Block a user