jingham added inline comments.

================
Comment at: source/Target/ObjCLanguageRuntime.cpp:403
+CompilerType
+ObjCLanguageRuntime::CalculateCompleteType(CompilerType base_type) {
+  CompilerType type_to_return;
----------------
xiaobai wrote:
> clayborg wrote:
> > So a main question for ObjC here: do we always want to show the runtime 
> > type? Should we not check if the class inside of "base_type" is the one 
> > true definition and skip grabbing the runtime type here and return {}?
> How do you know which is the "one true definition"?
The only places you can add ivars to an ObjC class are in the @interface 
declaration (which is usually in the .h file for the class) and in the 
@implementation and the "class category" - which has to be in the same source 
file as the @implementation.  So if you find debug information for the .m file 
that contains the @implementation you have seen all the ivars of the class.  
Clang marks that fact by putting "DW_AT_APPLE_objc_complete_type" with value 
"true" in the DW_TAG_structure_type die for the class.  If you see a type 
definition so marked, that it the "one true definition".


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D64159/new/

https://reviews.llvm.org/D64159



_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to