[Lldb-commits] [lldb] r146129 - /lldb/trunk/source/Plugins/SymbolFile/Symtab/SymbolFileSymtab.cpp
Sean Callanan
scallanan at apple.com
Wed Dec 7 18:08:41 PST 2011
Author: spyffe
Date: Wed Dec 7 20:08:40 2011
New Revision: 146129
URL: http://llvm.org/viewvc/llvm-project?rev=146129&view=rev
Log:
Removed function information from the symbol table
for now to fix testcases. Once we have a valid use
for the function information (i.e., once properties
returning UnknownAnyTy are allowed, once we read
return type information from the runtime, among
other uses) I will re-enable this.
Modified:
lldb/trunk/source/Plugins/SymbolFile/Symtab/SymbolFileSymtab.cpp
Modified: lldb/trunk/source/Plugins/SymbolFile/Symtab/SymbolFileSymtab.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/SymbolFile/Symtab/SymbolFileSymtab.cpp?rev=146129&r1=146128&r2=146129&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/SymbolFile/Symtab/SymbolFileSymtab.cpp (original)
+++ lldb/trunk/source/Plugins/SymbolFile/Symtab/SymbolFileSymtab.cpp Wed Dec 7 20:08:40 2011
@@ -383,7 +383,7 @@
{
if (!append)
types.Clear();
-
+
if (!m_objc_class_name_to_index.IsEmpty())
{
TypeMap::iterator iter = m_objc_class_types.find(name);
@@ -399,7 +399,7 @@
if (match == NULL)
return 0;
- const bool isForwardDecl = true;
+ const bool isForwardDecl = false;
const bool isInternal = true;
ClangASTContext &ast = GetClangASTContext();
@@ -408,59 +408,10 @@
ast.GetTranslationUnitDecl(),
isForwardDecl,
isInternal);
-
- ast.StartTagDeclarationDefinition (objc_object_type);
-
- std::string regex_str("^[-+]\\["); // Make sure it starts with "+[" or "-["
- regex_str.append(name.AsCString()); // Followed by the class name
- regex_str.append("[ \\(]"); // Followed by a space or '(' (for a category)
- RegularExpression regex(regex_str.c_str());
- Symtab::IndexCollection indices;
-
- lldb::clang_type_t unknown_type = ast.GetUnknownAnyType();
- std::vector<lldb::clang_type_t> arg_types;
-
- if (m_obj_file->GetSymtab()->FindAllSymbolsMatchingRexExAndType (regex, eSymbolTypeCode, Symtab::eDebugNo, Symtab::eVisibilityAny, indices) != 0)
- {
- for (Symtab::IndexCollection::iterator pos = indices.begin(), end = indices.end();
- pos != end;
- ++pos)
- {
- Symbol *symbol = m_obj_file->GetSymtab()->SymbolAtIndex(*pos);
-
- if (!symbol)
- continue;
-
- const char *signature = symbol->GetName().AsCString();
-
- //printf ("%s: adding '%s'\n", name.GetCString(), signature);
- int num_args = CountMethodArgs(signature);
-
- while (arg_types.size() < num_args)
- arg_types.push_back(unknown_type);
-
- bool is_variadic = false;
- unsigned type_quals = 0;
-
- lldb::clang_type_t method_type = ast.CreateFunctionType (unknown_type,
- arg_types.data(),
- num_args,
- is_variadic,
- type_quals);
-
- ast.AddMethodToObjCObjectType (objc_object_type,
- signature,
- method_type,
- eAccessPublic);
- }
- }
-
- ast.CompleteTagDeclarationDefinition (objc_object_type);
-
Declaration decl;
- lldb::TypeSP type(new Type (indices[0],
+ lldb::TypeSP type(new Type (iter->second,
this,
name,
0, // byte_size
More information about the lldb-commits
mailing list