diff options
| author | Sean Callanan <scallanan@apple.com> | 2011-10-27 02:06:03 +0000 |
|---|---|---|
| committer | Sean Callanan <scallanan@apple.com> | 2011-10-27 02:06:03 +0000 |
| commit | fb40b0d4b59a24c100e1156964e74290c7d82abf (patch) | |
| tree | 4dd8e544dd447fbf348a4cd6e8d23f696a095cf5 | |
| parent | 73beaf7bbc5a4344c9c68b1c262c11c33d3cf72d (diff) | |
| download | bcm5719-llvm-fb40b0d4b59a24c100e1156964e74290c7d82abf.tar.gz bcm5719-llvm-fb40b0d4b59a24c100e1156964e74290c7d82abf.zip | |
Disabled lookups for the Objective-C builtin type "id;"
the compiler should pick this type up automatically.
llvm-svn: 143094
| -rw-r--r-- | lldb/source/Expression/ClangExpressionDeclMap.cpp | 47 |
1 files changed, 26 insertions, 21 deletions
diff --git a/lldb/source/Expression/ClangExpressionDeclMap.cpp b/lldb/source/Expression/ClangExpressionDeclMap.cpp index 64dea9cc006..9acf8c21b52 100644 --- a/lldb/source/Expression/ClangExpressionDeclMap.cpp +++ b/lldb/source/Expression/ClangExpressionDeclMap.cpp @@ -2642,34 +2642,39 @@ ClangExpressionDeclMap::FindExternalVisibleDecls (NameSearchContext &context, } } } - } - - TypeList types; - SymbolContext null_sc; + } - if (module_sp && namespace_decl) - module_sp->FindTypes(null_sc, name, &namespace_decl, true, 1, types); - else - target->GetImages().FindTypes (null_sc, name, true, 1, types); + static ConstString id_name("id"); - if (types.GetSize()) + if (name != id_name) { - TypeSP type_sp = types.GetTypeAtIndex(0); + TypeList types; + SymbolContext null_sc; - if (log) + if (module_sp && namespace_decl) + module_sp->FindTypes(null_sc, name, &namespace_decl, true, 1, types); + else + target->GetImages().FindTypes (null_sc, name, true, 1, types); + + if (types.GetSize()) { - const char *name_string = type_sp->GetName().GetCString(); + TypeSP type_sp = types.GetTypeAtIndex(0); - log->Printf(" FEVD[%u] Matching type found for \"%s\": %s", - current_id, - name.GetCString(), - (name_string ? name_string : "<anonymous>")); - } + if (log) + { + const char *name_string = type_sp->GetName().GetCString(); + + log->Printf(" FEVD[%u] Matching type found for \"%s\": %s", + current_id, + name.GetCString(), + (name_string ? name_string : "<anonymous>")); + } - TypeFromUser user_type(type_sp->GetClangFullType(), - type_sp->GetClangAST()); - - AddOneType(context, user_type, current_id, false); + TypeFromUser user_type(type_sp->GetClangFullType(), + type_sp->GetClangAST()); + + AddOneType(context, user_type, current_id, false); + } } } |

