diff options
author | Iain Sandoe <iain@sandoe.co.uk> | 2020-10-24 09:48:44 +0100 |
---|---|---|
committer | Iain Sandoe <iain@sandoe.co.uk> | 2020-11-01 20:28:57 +0000 |
commit | bb93020ff852fb159bc329bbaea12a33a4ef6761 (patch) | |
tree | 3e568e503293dc71ed8c26a6eb95dff25945d1bc /gcc/objc/objc-act.h | |
parent | 7a2cc1e8438ee853900f20880ca8858c17486b10 (diff) | |
download | gcc-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.h')
-rw-r--r-- | gcc/objc/objc-act.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/gcc/objc/objc-act.h b/gcc/objc/objc-act.h index 913e152..db71b6a 100644 --- a/gcc/objc/objc-act.h +++ b/gcc/objc/objc-act.h @@ -371,6 +371,7 @@ enum objc_tree_index OCTI_ID_NAME, OCTI_INSTANCETYPE_NAME, OCTI_CLASS_NAME, + OCTI_SEL_NAME, OCTI_CNST_STR_ID, OCTI_CNST_STR_TYPE, OCTI_CNST_STR_GLOB_ID, @@ -576,6 +577,7 @@ extern GTY(()) tree objc_global_trees[OCTI_MAX]; #define objc_object_name objc_global_trees[OCTI_ID_NAME] #define objc_instancetype_name objc_global_trees[OCTI_INSTANCETYPE_NAME] #define objc_class_name objc_global_trees[OCTI_CLASS_NAME] +#define objc_selector_name objc_global_trees[OCTI_SEL_NAME] /* Constant string classes. */ #define constant_string_id objc_global_trees[OCTI_CNST_STR_ID] @@ -614,6 +616,7 @@ extern GTY(()) tree objc_global_trees[OCTI_MAX]; #define OBJECT_TYPEDEF_NAME "id" #define INSTANCE_TYPEDEF_NAME "instancetype" #define CLASS_TYPEDEF_NAME "Class" +#define SEL_TYPEDEF_NAME "SEL" #define TAG_OBJECT "objc_object" #define TAG_CLASS "objc_class" |