Objective-C : Implement SEL as a built-in typedef.
authorIain Sandoe <iain@sandoe.co.uk>
Sat, 24 Oct 2020 08:48:44 +0000 (09:48 +0100)
committerIain Sandoe <iain@sandoe.co.uk>
Sun, 1 Nov 2020 20:28:57 +0000 (20:28 +0000)
commitbb93020ff852fb159bc329bbaea12a33a4ef6761
tree3e568e503293dc71ed8c26a6eb95dff25945d1bc
parent7a2cc1e8438ee853900f20880ca8858c17486b10
Objective-C : Implement SEL as a built-in typedef.

The reference implementation for Objective-C provides the SEL
typedef (although it is also available from <objc/objc.h>).

gcc/objc/ChangeLog:

* objc-act.c (synth_module_prologue): Get the SEL identifier.
* objc-act.h (enum objc_tree_index): Add OCTI_SEL_NAME.
(objc_selector_name): New.
(SEL_TYPEDEF_NAME): New.
* objc-gnu-runtime-abi-01.c
(gnu_runtime_01_initialize): Initialize SEL typedef.
* objc-next-runtime-abi-01.c
(next_runtime_01_initialize): Likewise.
* objc-next-runtime-abi-02.c

gcc/testsuite/ChangeLog:

* obj-c++.dg/SEL-typedef.mm: New test.
* objc.dg/SEL-typedef.m: New test.
gcc/objc/objc-act.c
gcc/objc/objc-act.h
gcc/objc/objc-gnu-runtime-abi-01.c
gcc/objc/objc-next-runtime-abi-01.c
gcc/objc/objc-next-runtime-abi-02.c
gcc/testsuite/obj-c++.dg/SEL-typedef.mm [new file with mode: 0644]
gcc/testsuite/objc.dg/SEL-typedef.m [new file with mode: 0644]