diff options
author | Mike Stump <mikestump@comcast.net> | 2011-02-21 21:38:21 +0000 |
---|---|---|
committer | Mike Stump <mrs@gcc.gnu.org> | 2011-02-21 21:38:21 +0000 |
commit | d1d46f9f70fff00e39f71183909f37605a113b3f (patch) | |
tree | 3a09989bc2b7ebdaa2146f5f3b8aa2731fc84b6f /gcc/config/darwin.c | |
parent | 23e0d9301971df49e1b283e948a548faf0d3facd (diff) | |
download | gcc-d1d46f9f70fff00e39f71183909f37605a113b3f.zip gcc-d1d46f9f70fff00e39f71183909f37605a113b3f.tar.gz gcc-d1d46f9f70fff00e39f71183909f37605a113b3f.tar.bz2 |
re PR target/47822 (Multiple test suite failures due to revision 170321)
PR target/47822
* config/darwin-protos.h (darwin_init_cfstring_builtins): Return a
tree so we can get save the type.
* config/i386/darwin.h (SUBTARGET_INIT_BUILTINS): Reserve builtin slot
for CFString instead of trying to use past the end of the builtins.
* config/i386/i386.c (IX86_BUILTIN_CFSTRING): Likewise.
* config/rs6000/rs6000-builtin.def (RS6000_BUILTIN_CFSTRING): Likewise.
* config/rs6000/darwin.h (SUBTARGET_INIT_BUILTINS): Likewise.
* config/darwin.c (DARWIN_BUILTIN_CFSTRINGMAKECONSTANTSTRING):
Rename to darwin_builtin_cfstring.
(darwin_init_cfstring_builtins): Return the built type.
From-SVN: r170376
Diffstat (limited to 'gcc/config/darwin.c')
-rw-r--r-- | gcc/config/darwin.c | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/gcc/config/darwin.c b/gcc/config/darwin.c index 2969f10..5e358b1 100644 --- a/gcc/config/darwin.c +++ b/gcc/config/darwin.c @@ -3001,7 +3001,7 @@ static GTY(()) tree pccfstring_type_node = NULL_TREE; static GTY(()) tree pcint_type_node = NULL_TREE; static GTY(()) tree pcchar_type_node = NULL_TREE; -static enum built_in_function DARWIN_BUILTIN_CFSTRINGMAKECONSTANTSTRING; +static enum built_in_function darwin_builtin_cfstring; /* Store all constructed constant CFStrings in a hash table so that they get uniqued properly. */ @@ -3031,14 +3031,14 @@ add_builtin_field_decl (tree type, const char *name, tree **chain) return field; } -void -darwin_init_cfstring_builtins (unsigned first_avail) +tree +darwin_init_cfstring_builtins (unsigned builtin_cfstring) { tree cfsfun, fields, pccfstring_ftype_pcchar; tree *chain = NULL; - DARWIN_BUILTIN_CFSTRINGMAKECONSTANTSTRING = - (enum built_in_function) first_avail; + darwin_builtin_cfstring = + (enum built_in_function) builtin_cfstring; /* struct __builtin_CFString { const int *isa; (will point at @@ -3084,7 +3084,7 @@ darwin_init_cfstring_builtins (unsigned first_avail) DECL_LANG_SPECIFIC (cfsfun) = NULL; (*lang_hooks.dup_lang_specific_decl) (cfsfun); DECL_BUILT_IN_CLASS (cfsfun) = BUILT_IN_MD; - DECL_FUNCTION_CODE (cfsfun) = DARWIN_BUILTIN_CFSTRINGMAKECONSTANTSTRING; + DECL_FUNCTION_CODE (cfsfun) = darwin_builtin_cfstring; lang_hooks.builtin_function (cfsfun); /* extern int __CFConstantStringClassReference[]; */ @@ -3100,6 +3100,8 @@ darwin_init_cfstring_builtins (unsigned first_avail) /* Initialize the hash table used to hold the constant CFString objects. */ cfstring_htab = htab_create_ggc (31, cfstring_hash, cfstring_eq, NULL); + + return cfstring_type_node; } tree @@ -3108,7 +3110,7 @@ darwin_fold_builtin (tree fndecl, int n_args, tree *argp, { unsigned int fcode = DECL_FUNCTION_CODE (fndecl); - if (fcode == DARWIN_BUILTIN_CFSTRINGMAKECONSTANTSTRING) + if (fcode == darwin_builtin_cfstring) { if (!darwin_constant_cfstrings) { |