aboutsummaryrefslogtreecommitdiff
path: root/gcc/c-common.c
diff options
context:
space:
mode:
authorKai Tietz <kai.tietz@onevision.com>2010-05-28 11:58:35 +0000
committerKai Tietz <ktietz@gcc.gnu.org>2010-05-28 13:58:35 +0200
commitd4048208a4c81eca9372664003b09922b9d5d1aa (patch)
treec3d191d473097e189086bc6f9d252e42b7ae28ce /gcc/c-common.c
parent40dcd88bb984adbf44039ecef933bd061a810e06 (diff)
downloadgcc-d4048208a4c81eca9372664003b09922b9d5d1aa.zip
gcc-d4048208a4c81eca9372664003b09922b9d5d1aa.tar.gz
gcc-d4048208a4c81eca9372664003b09922b9d5d1aa.tar.bz2
c-common.c (c_common_nodes_and_builtins): Replace use of TARGET_ENUM_VA_LIST by target hook enum_va_list.
2010-05-28 Kai Tietz <kai.tietz@onevision.com> * c-common.c (c_common_nodes_and_builtins): Replace use of TARGET_ENUM_VA_LIST by target hook enum_va_list. * config/i386/i386.c (TARGET_ENUM_VA_LIST_P): Hook to ix86_enum_va_list. * config/i386/i386.h (TARGET_ENUM_VA_LIST): Removed. * doc/tm.texi (TARGET_ENUM_VA_LIST): Removed. (TARGET_ENUM_VA_LIST_P): Add hook description. * target-def.h (TARGET_ENUM_VA_LIST_P): Added. * target.h (gcc_target): Add enum_va_list hook. From-SVN: r159966
Diffstat (limited to 'gcc/c-common.c')
-rw-r--r--gcc/c-common.c28
1 files changed, 14 insertions, 14 deletions
diff --git a/gcc/c-common.c b/gcc/c-common.c
index 1fd11c5..77026fa 100644
--- a/gcc/c-common.c
+++ b/gcc/c-common.c
@@ -5114,21 +5114,21 @@ c_common_nodes_and_builtins (void)
(build_decl (UNKNOWN_LOCATION,
TYPE_DECL, get_identifier ("__builtin_va_list"),
va_list_type_node));
-#ifdef TARGET_ENUM_VA_LIST
- {
- int l;
- const char *pname;
- tree ptype;
- for (l = 0; TARGET_ENUM_VA_LIST (l, &pname, &ptype); ++l)
- {
- lang_hooks.decls.pushdecl
- (build_decl (UNKNOWN_LOCATION,
- TYPE_DECL, get_identifier (pname),
- ptype));
+ if (targetm.enum_va_list)
+ {
+ int l;
+ const char *pname;
+ tree ptype;
- }
- }
-#endif
+ for (l = 0; targetm.enum_va_list (l, &pname, &ptype); ++l)
+ {
+ lang_hooks.decls.pushdecl
+ (build_decl (UNKNOWN_LOCATION,
+ TYPE_DECL, get_identifier (pname),
+ ptype));
+
+ }
+ }
if (TREE_CODE (va_list_type_node) == ARRAY_TYPE)
{