summaryrefslogtreecommitdiff
path: root/gcc/config/darwin.c
diff options
context:
space:
mode:
authorzlaski <zlaski@138bc75d-0d04-0410-961f-82ee72b054a4>2005-06-29 21:01:29 +0000
committerzlaski <zlaski@138bc75d-0d04-0410-961f-82ee72b054a4>2005-06-29 21:01:29 +0000
commit0616a9489ecf745db46e0c0cc886e602782b6c05 (patch)
tree6eb42b09d8fffee909d4e2a323a1040fbd7da55c /gcc/config/darwin.c
parent20e8f94aec029aa6191e559427d50255e67af01f (diff)
downloadgcc-0616a9489ecf745db46e0c0cc886e602782b6c05.tar.gz
[gcc/ChangeLog]
2005-06-29 Ziemowit Laski <zlaski@apple.com> * config/darwin.c (machopic_select_section): constant ObjC string objects now always have type "__builtin_ObjCString". [gcc/objc/ChangeLog] 2005-06-29 Ziemowit Laski <zlaski@apple.com> * objc-act.c (objc_build_internal_const_str_type): New function. (check_string_class_template): Use objc_get_class_ivars() instead of TYPE_FIELDS() to retrieve ivar list. (AT_LEAST_AS_LARGE_AS): Check the size of each field's type rather than the field itself. (objc_build_string_object): Synthesize a "__builtin_ObjCString" type and use it to lay out compile-time string objects. * objc-act.h (OCTI_INTERNAL_CNST_STR_TYPE, internal_const_str_type): New. [gcc/testsuite/ChangeLog] 2005-06-29 Ziemowit Laski <zlaski@apple.com> * obj-c++.dg/const-str-1[0-1].mm: New. * objc.dg/const-str-1[0-1].m: New. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@101437 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/config/darwin.c')
-rw-r--r--gcc/config/darwin.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/gcc/config/darwin.c b/gcc/config/darwin.c
index 13de45f74a5..cac61e403c9 100644
--- a/gcc/config/darwin.c
+++ b/gcc/config/darwin.c
@@ -1048,10 +1048,14 @@ machopic_select_section (tree exp, int reloc,
tree name = TYPE_NAME (TREE_TYPE (exp));
if (TREE_CODE (name) == TYPE_DECL)
name = DECL_NAME (name);
- if (!strcmp (IDENTIFIER_POINTER (name), "NSConstantString"))
- objc_constant_string_object_section ();
- else if (!strcmp (IDENTIFIER_POINTER (name), "NXConstantString"))
- objc_string_object_section ();
+
+ if (!strcmp (IDENTIFIER_POINTER (name), "__builtin_ObjCString"))
+ {
+ if (flag_next_runtime)
+ objc_constant_string_object_section ();
+ else
+ objc_string_object_section ();
+ }
else
base_function ();
}