diff options
| author | Sean Callanan <scallanan@apple.com> | 2011-12-08 02:08:40 +0000 |
|---|---|---|
| committer | Sean Callanan <scallanan@apple.com> | 2011-12-08 02:08:40 +0000 |
| commit | 6c62c83c123f0286ef4c4031c5949749d287c491 (patch) | |
| tree | 30719124de9455b3c2954c501545a94533e2adce /lldb/source/Plugins/SymbolFile | |
| parent | a86588c4b0faa717a57fb60cb33b9ad07ad93153 (diff) | |
| download | bcm5719-llvm-6c62c83c123f0286ef4c4031c5949749d287c491.tar.gz bcm5719-llvm-6c62c83c123f0286ef4c4031c5949749d287c491.zip | |
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.
llvm-svn: 146129
Diffstat (limited to 'lldb/source/Plugins/SymbolFile')
| -rw-r--r-- | lldb/source/Plugins/SymbolFile/Symtab/SymbolFileSymtab.cpp | 55 |
1 files changed, 3 insertions, 52 deletions
diff --git a/lldb/source/Plugins/SymbolFile/Symtab/SymbolFileSymtab.cpp b/lldb/source/Plugins/SymbolFile/Symtab/SymbolFileSymtab.cpp index 5b95c5964cf..44f567e3c01 100644 --- a/lldb/source/Plugins/SymbolFile/Symtab/SymbolFileSymtab.cpp +++ b/lldb/source/Plugins/SymbolFile/Symtab/SymbolFileSymtab.cpp @@ -383,7 +383,7 @@ SymbolFileSymtab::FindTypes (const lldb_private::SymbolContext& sc, { 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 @@ SymbolFileSymtab::FindTypes (const lldb_private::SymbolContext& sc, if (match == NULL) return 0; - const bool isForwardDecl = true; + const bool isForwardDecl = false; const bool isInternal = true; ClangASTContext &ast = GetClangASTContext(); @@ -408,59 +408,10 @@ SymbolFileSymtab::FindTypes (const lldb_private::SymbolContext& sc, 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 |

