Fixed a bug in which the SEL type was being resolved

wrongly as the target of a pointer rather than the
SEL pointer itself.  This caused incorrect behavior
when dealing with Objective-C selector variables.

llvm-svn: 121048
This commit is contained in:
Sean Callanan 2010-12-06 22:16:55 +00:00
parent c6bd1d32bf
commit 88339f0fd1
3 changed files with 5 additions and 2 deletions

View File

@ -846,7 +846,7 @@ IRForTarget::MaybeHandleVariable (Module &llvm_module, Value *llvm_value_ptr)
lldb::LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_EXPRESSIONS));
if (log)
log->Printf("MaybeHandleVariable (%s)\n", PrintValue(llvm_value_ptr).c_str());
log->Printf("MaybeHandleVariable (%s)", PrintValue(llvm_value_ptr).c_str());
if (ConstantExpr *constant_expr = dyn_cast<ConstantExpr>(llvm_value_ptr))
{

View File

@ -2933,7 +2933,7 @@ SymbolFileDWARF::ParseType (const SymbolContext& sc, DWARFCompileUnit* dwarf_cu,
}
else if (type_name_const_str == g_objc_type_name_selector)
{
clang_type = ast.GetBuiltInType_objc_selector();
clang_type = ast.CreatePointerType(ast.GetBuiltInType_objc_selector());
resolve_state = Type::eResolveStateFull;
}
}

View File

@ -160,6 +160,9 @@ ClangASTType::GetEncoding (clang_type_t clang_type, uint32_t &count)
case clang::BuiltinType::Float:
case clang::BuiltinType::Double:
case clang::BuiltinType::LongDouble: return lldb::eEncodingIEEE754;
case clang::BuiltinType::ObjCId:
case clang::BuiltinType::ObjCSel: return lldb::eEncodingUint;
case clang::BuiltinType::NullPtr: return lldb::eEncodingUint;
}