[Lldb-commits] [PATCH] D63622: [Target] Hoist LanguageRuntime::GetDeclVendor

Jim Ingham via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Fri Jun 21 10:51:32 PDT 2019

jingham added a subscriber: labath.
jingham added a comment.

In D63622#1553121 <https://reviews.llvm.org/D63622#1553121>, @labath wrote:

> Seems like a reasonable thing to do, but I don't really know what this code does...

The runtime DeclVendor gives runtimes a way to produce type information from runtime metadata.  For instance, the ObjC runtime tables actually have fairly good type information for all ObjC classes - both instance variables, properties and methods.  It is a little lossy, but for instance it knows the return types of methods so with this augmentation users can call ObjC methods without requiring casting...  This is just the code to query the runtime's DeclVendors to see if they know anything about a given typename.

ObjC is a bit obnoxious, because you can define instance variables and methods in the implementation of a class as well as its interface.  So even though you might have a debug info definition for the type - gotten from including the interface header file - that may not be as good as what you can get from the runtime.  But the runtime type info is, as I said, lossy so if you DO have debug info it will be better.  That means for ObjC you have to do some kind of merge operation to get the best information for a type.  That complexity doesn't affect this patch, but I couldn't resist the opportunity to moan about it a bit since it's given US so much grief over the years!



More information about the lldb-commits mailing list