comparison gcc/lto/lto-lang.c @ 63:b7f97abdc517 gcc-4.6-20100522

update gcc from gcc-4.5.0 to gcc-4.6
author ryoma <e075725@ie.u-ryukyu.ac.jp>
date Mon, 24 May 2010 12:47:05 +0900
parents 77e2b8dfacca
children f6334be47118
comparison
equal deleted inserted replaced
56:3c8a44c06a95 63:b7f97abdc517
614 argument or a binary value indicating whether the positive or negative form 614 argument or a binary value indicating whether the positive or negative form
615 of the option was supplied. */ 615 of the option was supplied. */
616 616
617 const char *resolution_file_name; 617 const char *resolution_file_name;
618 static int 618 static int
619 lto_handle_option (size_t scode, const char *arg, int value ATTRIBUTE_UNUSED) 619 lto_handle_option (size_t scode, const char *arg,
620 int value ATTRIBUTE_UNUSED, int kind ATTRIBUTE_UNUSED)
620 { 621 {
621 enum opt_code code = (enum opt_code) scode; 622 enum opt_code code = (enum opt_code) scode;
622 int result = 1; 623 int result = 1;
623 624
624 switch (code) 625 switch (code)
625 { 626 {
626 case OPT_fresolution: 627 case OPT_fresolution_:
627 resolution_file_name = arg; 628 resolution_file_name = arg;
628 result = 1; 629 result = 1;
629 break; 630 break;
630 631
631 case OPT_Wabi: 632 case OPT_Wabi:
632 warn_psabi = value; 633 warn_psabi = value;
634 break;
635
636 case OPT_fsigned_char:
637 flag_signed_char = value;
638 break;
639
640 case OPT_funsigned_char:
641 flag_signed_char = !value;
633 break; 642 break;
634 643
635 default: 644 default:
636 break; 645 break;
637 } 646 }
1008 { 1017 {
1009 intmax_type_node = long_integer_type_node; 1018 intmax_type_node = long_integer_type_node;
1010 uintmax_type_node = long_unsigned_type_node; 1019 uintmax_type_node = long_unsigned_type_node;
1011 signed_size_type_node = long_integer_type_node; 1020 signed_size_type_node = long_integer_type_node;
1012 } 1021 }
1022 else if (strcmp (SIZE_TYPE, "long long unsigned int") == 0)
1023 {
1024 intmax_type_node = long_long_integer_type_node;
1025 uintmax_type_node = long_long_unsigned_type_node;
1026 signed_size_type_node = long_long_integer_type_node;
1027 }
1013 else 1028 else
1014 gcc_unreachable (); 1029 gcc_unreachable ();
1015 1030
1016 wint_type_node = unsigned_type_node; 1031 wint_type_node = unsigned_type_node;
1017 pid_type_node = integer_type_node; 1032 pid_type_node = integer_type_node;
1029 /* Initialize libcpp line maps for gcc_assert to work. */ 1044 /* Initialize libcpp line maps for gcc_assert to work. */
1030 linemap_add (line_table, LC_RENAME, 0, NULL, 0); 1045 linemap_add (line_table, LC_RENAME, 0, NULL, 0);
1031 linemap_add (line_table, LC_RENAME, 0, NULL, 0); 1046 linemap_add (line_table, LC_RENAME, 0, NULL, 0);
1032 1047
1033 /* Create the basic integer types. */ 1048 /* Create the basic integer types. */
1034 build_common_tree_nodes (flag_signed_char, /*signed_sizetype=*/false); 1049 build_common_tree_nodes (flag_signed_char);
1035 1050
1036 /* Share char_type_node with whatever would be the default for the target. 1051 /* Share char_type_node with whatever would be the default for the target.
1037 char_type_node will be used for internal types such as 1052 char_type_node will be used for internal types such as
1038 va_list_type_node but will not be present in the lto stream. */ 1053 va_list_type_node but will not be present in the lto stream. */
1054 /* ??? This breaks the more common case of consistent but non-standard
1055 setting of flag_signed_char, so share according to flag_signed_char.
1056 See PR42528. */
1039 char_type_node 1057 char_type_node
1040 = DEFAULT_SIGNED_CHAR ? signed_char_type_node : unsigned_char_type_node; 1058 = flag_signed_char ? signed_char_type_node : unsigned_char_type_node;
1041 1059
1042 /* Tell the middle end what type to use for the size of objects. */ 1060 /* Tell the middle end what type to use for the size of objects. */
1043 if (strcmp (SIZE_TYPE, "unsigned int") == 0) 1061 if (strcmp (SIZE_TYPE, "unsigned int") == 0)
1044 { 1062 {
1045 set_sizetype (unsigned_type_node); 1063 set_sizetype (unsigned_type_node);
1047 } 1065 }
1048 else if (strcmp (SIZE_TYPE, "long unsigned int") == 0) 1066 else if (strcmp (SIZE_TYPE, "long unsigned int") == 0)
1049 { 1067 {
1050 set_sizetype (long_unsigned_type_node); 1068 set_sizetype (long_unsigned_type_node);
1051 size_type_node = long_unsigned_type_node; 1069 size_type_node = long_unsigned_type_node;
1070 }
1071 else if (strcmp (SIZE_TYPE, "long long unsigned int") == 0)
1072 {
1073 set_sizetype (long_long_unsigned_type_node);
1074 size_type_node = long_long_unsigned_type_node;
1052 } 1075 }
1053 else 1076 else
1054 gcc_unreachable (); 1077 gcc_unreachable ();
1055 1078
1056 /* The global tree for the main identifier is filled in by 1079 /* The global tree for the main identifier is filled in by
1145 #define LANG_HOOKS_COMMON_ATTRIBUTE_TABLE lto_attribute_table 1168 #define LANG_HOOKS_COMMON_ATTRIBUTE_TABLE lto_attribute_table
1146 #undef LANG_HOOKS_FORMAT_ATTRIBUTE_TABLE 1169 #undef LANG_HOOKS_FORMAT_ATTRIBUTE_TABLE
1147 #define LANG_HOOKS_FORMAT_ATTRIBUTE_TABLE lto_format_attribute_table 1170 #define LANG_HOOKS_FORMAT_ATTRIBUTE_TABLE lto_format_attribute_table
1148 1171
1149 #undef LANG_HOOKS_BEGIN_SECTION 1172 #undef LANG_HOOKS_BEGIN_SECTION
1150 #define LANG_HOOKS_BEGIN_SECTION lto_elf_begin_section 1173 #define LANG_HOOKS_BEGIN_SECTION lto_obj_begin_section
1151 #undef LANG_HOOKS_APPEND_DATA 1174 #undef LANG_HOOKS_APPEND_DATA
1152 #define LANG_HOOKS_APPEND_DATA lto_elf_append_data 1175 #define LANG_HOOKS_APPEND_DATA lto_obj_append_data
1153 #undef LANG_HOOKS_END_SECTION 1176 #undef LANG_HOOKS_END_SECTION
1154 #define LANG_HOOKS_END_SECTION lto_elf_end_section 1177 #define LANG_HOOKS_END_SECTION lto_obj_end_section
1155 1178
1156 #undef LANG_HOOKS_INIT_TS 1179 #undef LANG_HOOKS_INIT_TS
1157 #define LANG_HOOKS_INIT_TS lto_init_ts 1180 #define LANG_HOOKS_INIT_TS lto_init_ts
1158 1181
1159 struct lang_hooks lang_hooks = LANG_HOOKS_INITIALIZER; 1182 struct lang_hooks lang_hooks = LANG_HOOKS_INITIALIZER;