Objective-C, Darwin : Pick up super refs directly.
authorIain Sandoe <iain@sandoe.co.uk>
Tue, 6 Oct 2020 17:47:26 +0000 (18:47 +0100)
committerIain Sandoe <iain@sandoe.co.uk>
Sat, 10 Oct 2020 16:28:04 +0000 (17:28 +0100)
commitc28d91bf23ad5767265a1298be6fef0caa0a85f0
tree5b1ab182daaf83d572b742853a360e9739f17214
parentbb675539ba2f661c6bfab258847b41798a449432
Objective-C, Darwin : Pick up super refs directly.

The current code assumed that super refs could be computed
indirectly, i.e. that the metadata generated by the compiler
was immutable by the runtime. This does not always hold
(it depends on the NeXT runtime version).  So, compute super
refs directly.

gcc/objc/ChangeLog:

* objc-next-runtime-abi-02.c
(objc_get_superclass_ref_decl): Split this code out.
(next_runtime_abi_02_get_class_super_ref): Compute
super refs using the objc_get_superclass_ref_decl().
(next_runtime_abi_02_get_category_super_ref): Likewise.
gcc/objc/objc-next-runtime-abi-02.c