aboutsummaryrefslogtreecommitdiff
path: root/gcc/objc/objc-act.c
diff options
context:
space:
mode:
authorIain Sandoe <iain@sandoe.co.uk>2020-10-24 09:48:44 +0100
committerIain Sandoe <iain@sandoe.co.uk>2020-11-01 20:28:57 +0000
commitbb93020ff852fb159bc329bbaea12a33a4ef6761 (patch)
tree3e568e503293dc71ed8c26a6eb95dff25945d1bc /gcc/objc/objc-act.c
parent7a2cc1e8438ee853900f20880ca8858c17486b10 (diff)
downloadgcc-bb93020ff852fb159bc329bbaea12a33a4ef6761.zip
gcc-bb93020ff852fb159bc329bbaea12a33a4ef6761.tar.gz
gcc-bb93020ff852fb159bc329bbaea12a33a4ef6761.tar.bz2
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.
Diffstat (limited to 'gcc/objc/objc-act.c')
-rw-r--r--gcc/objc/objc-act.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/gcc/objc/objc-act.c b/gcc/objc/objc-act.c
index 31a2cf3..0393bc4 100644
--- a/gcc/objc/objc-act.c
+++ b/gcc/objc/objc-act.c
@@ -2954,6 +2954,7 @@ synth_module_prologue (void)
objc_object_name = get_identifier (OBJECT_TYPEDEF_NAME);
objc_instancetype_name = get_identifier (INSTANCE_TYPEDEF_NAME);
objc_class_name = get_identifier (CLASS_TYPEDEF_NAME);
+ objc_selector_name = get_identifier (SEL_TYPEDEF_NAME);
/* Declare the 'id', 'instancetype' and 'Class' typedefs. */
type = lang_hooks.decls.pushdecl (build_decl (input_location,