[lldb-dev] ObjC decl string checks in Expr Eval?

Greg Clayton gclayton at apple.com
Thu Mar 6 15:07:41 PST 2014


What Jim said was true, but I believe it goes a bit further. If we are asked to lookup "id" or "Class", we will find something in the DWARF which will cause a type to be created which isn't compatible with the internally defined "id" and "Class" that the compiler knows about for Objective C. Then this causes problems evaluating expressions...

What platform are you running your expressions on? We might be able to disable objective C for platforms that don't support it (ObjC should be enabled for anything that is "*-apple-macosx" or "*-apple-ios").

Greg

On Mar 6, 2014, at 8:41 AM, Colin Riley <colin at codeplay.com> wrote:

> Hey folks,
> 
> I'm interested in the following code in ClangASTSource.cpp - ClangASTSource::FindExternalVisibleDecls(), around line 605.
> 
> ...
>    static ConstString id_name("id");
>    static ConstString Class_name("Class");
> 
>    if (name == id_name || name == Class_name)
>        return;
> ...
> 
> Is this a legacy bit of ObjC early exit magic? I've been wondering why expression evaluation was failing only ever on variables called 'id' ;) I don't have the ability to validate implications of removal of the code on ObjC. Any opinions on whether this is actually still needed?
> 
> Colin
> 
> -- 
> Colin Riley
> 
> Codeplay Software Ltd
> 45 York Place, Edinburgh, EH1 3HP
> Phone: +44 131 466 0503
> Fax: +44 131 557 6600
> Website: http://www.codeplay.com
> 
> _______________________________________________
> lldb-dev mailing list
> lldb-dev at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/lldb-dev




More information about the lldb-dev mailing list