vsk added a comment.

Thanks for the review!

I looked at the IR and confirmed that the ivars are laid out in the order 
they're defined, that the indirect ivar offsets make sense, and that the 
runtime ivar offsets match up with what we expect. E.g;

  @"OBJC_IVAR_$_FlexibleArray1.chars" = global i64 0 ...
  @"\01l_OBJC_$_INSTANCE_VARIABLES_FlexibleArray1" = private global { i32, i32, 
[1 x %struct._ivar_t] } ...
  
  ---
  
  @"OBJC_IVAR_$_FlexibleArray2.chars" = global i64 0
  @"OBJC_IVAR_$_FlexibleArray2.chars2" = global i64 0 ;; < This offset 
increases if we sandwich an int between chars and chars2.
  @"\01l_OBJC_$_INSTANCE_VARIABLES_FlexibleArray2" = private global { i32, i32, 
[2 x %struct._ivar_t] } ...


https://reviews.llvm.org/D22227



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

Reply via email to