Commit abdafc8e by Devang Patel Committed by Devang Patel

dbxout.c (have_used_extensions): Remove.

      * dbxout.c (have_used_extensions): Remove.
      (dbxout_type_fileds, dbxout_type, dbxout_symbol): Remove use of
      have_used_extensions.

From-SVN: r98958
parent 19150275
2005-04-28 Devang Patel <dpatel@apple.com>
* dbxout.c (have_used_extensions): Remove.
(dbxout_type_fileds, dbxout_type, dbxout_symbol): Remove use of
have_used_extensions.
2005-04-28 James E Wilson <wilson@specifixinc.com> 2005-04-28 James E Wilson <wilson@specifixinc.com>
* doc/install.texi: Update -enable-languages info. Correct path to * doc/install.texi: Update -enable-languages info. Correct path to
......
...@@ -241,13 +241,6 @@ static GTY(()) int scope_labelno; ...@@ -241,13 +241,6 @@ static GTY(()) int scope_labelno;
static GTY(()) int dbxout_source_line_counter; static GTY(()) int dbxout_source_line_counter;
/* Nonzero if we have actually used any of the GDB extensions
to the debugging format. The idea is that we use them for the
first time only if there's a strong reason, but once we have done that,
we use them whenever convenient. */
static GTY(()) int have_used_extensions = 0;
/* Number for the next N_SOL filename stabs label. The number 0 is reserved /* Number for the next N_SOL filename stabs label. The number 0 is reserved
for the N_SO filename stabs label. */ for the N_SO filename stabs label. */
...@@ -1430,7 +1423,6 @@ dbxout_type_fields (tree type) ...@@ -1430,7 +1423,6 @@ dbxout_type_fields (tree type)
&& (TREE_PRIVATE (tem) || TREE_PROTECTED (tem) && (TREE_PRIVATE (tem) || TREE_PROTECTED (tem)
|| TREE_CODE (tem) != FIELD_DECL)) || TREE_CODE (tem) != FIELD_DECL))
{ {
have_used_extensions = 1;
stabstr_C ('/'); stabstr_C ('/');
stabstr_C (DECL_ACCESSIBILITY_CHAR (tem)); stabstr_C (DECL_ACCESSIBILITY_CHAR (tem));
} }
...@@ -1445,7 +1437,6 @@ dbxout_type_fields (tree type) ...@@ -1445,7 +1437,6 @@ dbxout_type_fields (tree type)
{ {
tree name = DECL_ASSEMBLER_NAME (tem); tree name = DECL_ASSEMBLER_NAME (tem);
have_used_extensions = 1;
stabstr_C (':'); stabstr_C (':');
stabstr_I (name); stabstr_I (name);
stabstr_C (';'); stabstr_C (';');
...@@ -1860,7 +1851,6 @@ dbxout_type (tree type, int full) ...@@ -1860,7 +1851,6 @@ dbxout_type (tree type, int full)
if (use_gnu_debug_info_extensions if (use_gnu_debug_info_extensions
&& TYPE_PRECISION (type) != TYPE_PRECISION (integer_type_node)) && TYPE_PRECISION (type) != TYPE_PRECISION (integer_type_node))
{ {
have_used_extensions = 1;
stabstr_S ("@s"); stabstr_S ("@s");
stabstr_D (TYPE_PRECISION (type)); stabstr_D (TYPE_PRECISION (type));
stabstr_C (';'); stabstr_C (';');
...@@ -1877,7 +1867,6 @@ dbxout_type (tree type, int full) ...@@ -1877,7 +1867,6 @@ dbxout_type (tree type, int full)
if (use_gnu_debug_info_extensions if (use_gnu_debug_info_extensions
&& TYPE_PRECISION (type) != TYPE_PRECISION (integer_type_node)) && TYPE_PRECISION (type) != TYPE_PRECISION (integer_type_node))
{ {
have_used_extensions = 1;
stabstr_S ("@s"); stabstr_S ("@s");
stabstr_D (TYPE_PRECISION (type)); stabstr_D (TYPE_PRECISION (type));
stabstr_C (';'); stabstr_C (';');
...@@ -1924,7 +1913,6 @@ dbxout_type (tree type, int full) ...@@ -1924,7 +1913,6 @@ dbxout_type (tree type, int full)
case CHAR_TYPE: case CHAR_TYPE:
if (use_gnu_debug_info_extensions) if (use_gnu_debug_info_extensions)
{ {
have_used_extensions = 1;
stabstr_S ("@s"); stabstr_S ("@s");
stabstr_D (BITS_PER_UNIT * int_size_in_bytes (type)); stabstr_D (BITS_PER_UNIT * int_size_in_bytes (type));
stabstr_S (";-20;"); stabstr_S (";-20;");
...@@ -1942,7 +1930,6 @@ dbxout_type (tree type, int full) ...@@ -1942,7 +1930,6 @@ dbxout_type (tree type, int full)
case BOOLEAN_TYPE: case BOOLEAN_TYPE:
if (use_gnu_debug_info_extensions) if (use_gnu_debug_info_extensions)
{ {
have_used_extensions = 1;
stabstr_S ("@s"); stabstr_S ("@s");
stabstr_D (BITS_PER_UNIT * int_size_in_bytes (type)); stabstr_D (BITS_PER_UNIT * int_size_in_bytes (type));
stabstr_S (";-16;"); stabstr_S (";-16;");
...@@ -1988,7 +1975,6 @@ dbxout_type (tree type, int full) ...@@ -1988,7 +1975,6 @@ dbxout_type (tree type, int full)
/* Make arrays of packed bits look like bitstrings for chill. */ /* Make arrays of packed bits look like bitstrings for chill. */
if (TYPE_PACKED (type) && use_gnu_debug_info_extensions) if (TYPE_PACKED (type) && use_gnu_debug_info_extensions)
{ {
have_used_extensions = 1;
stabstr_S ("@s"); stabstr_S ("@s");
stabstr_D (BITS_PER_UNIT * int_size_in_bytes (type)); stabstr_D (BITS_PER_UNIT * int_size_in_bytes (type));
stabstr_S (";@S;S"); stabstr_S (";@S;S");
...@@ -1997,10 +1983,7 @@ dbxout_type (tree type, int full) ...@@ -1997,10 +1983,7 @@ dbxout_type (tree type, int full)
} }
if (use_gnu_debug_info_extensions && vector_type) if (use_gnu_debug_info_extensions && vector_type)
{ stabstr_S ("@V;");
have_used_extensions = 1;
stabstr_S ("@V;");
}
/* Output "a" followed by a range type definition /* Output "a" followed by a range type definition
for the index type of the array for the index type of the array
...@@ -2010,7 +1993,6 @@ dbxout_type (tree type, int full) ...@@ -2010,7 +1993,6 @@ dbxout_type (tree type, int full)
different from an array of characters. */ different from an array of characters. */
if (TYPE_STRING_FLAG (type) && use_gnu_debug_info_extensions) if (TYPE_STRING_FLAG (type) && use_gnu_debug_info_extensions)
{ {
have_used_extensions = 1;
stabstr_S ("@S;"); stabstr_S ("@S;");
} }
tem = TYPE_DOMAIN (type); tem = TYPE_DOMAIN (type);
...@@ -2080,7 +2062,6 @@ dbxout_type (tree type, int full) ...@@ -2080,7 +2062,6 @@ dbxout_type (tree type, int full)
{ {
if (BINFO_N_BASE_BINFOS (binfo)) if (BINFO_N_BASE_BINFOS (binfo))
{ {
have_used_extensions = 1;
stabstr_C ('!'); stabstr_C ('!');
stabstr_U (BINFO_N_BASE_BINFOS (binfo)); stabstr_U (BINFO_N_BASE_BINFOS (binfo));
stabstr_C (','); stabstr_C (',');
...@@ -2093,7 +2074,6 @@ dbxout_type (tree type, int full) ...@@ -2093,7 +2074,6 @@ dbxout_type (tree type, int full)
if (use_gnu_debug_info_extensions) if (use_gnu_debug_info_extensions)
{ {
have_used_extensions = 1;
stabstr_C (BINFO_VIRTUAL_P (child) ? '1' : '0'); stabstr_C (BINFO_VIRTUAL_P (child) ? '1' : '0');
stabstr_C (access == access_public_node ? '2' : stabstr_C (access == access_public_node ? '2' :
access == access_protected_node access == access_protected_node
...@@ -2138,7 +2118,6 @@ dbxout_type (tree type, int full) ...@@ -2138,7 +2118,6 @@ dbxout_type (tree type, int full)
dbxout_type_fields (type); dbxout_type_fields (type);
if (use_gnu_debug_info_extensions && TYPE_METHODS (type) != NULL_TREE) if (use_gnu_debug_info_extensions && TYPE_METHODS (type) != NULL_TREE)
{ {
have_used_extensions = 1;
dbxout_type_methods (type); dbxout_type_methods (type);
} }
...@@ -2148,7 +2127,6 @@ dbxout_type (tree type, int full) ...@@ -2148,7 +2127,6 @@ dbxout_type (tree type, int full)
/* Avoid the ~ if we don't really need it--it confuses dbx. */ /* Avoid the ~ if we don't really need it--it confuses dbx. */
&& TYPE_VFIELD (type)) && TYPE_VFIELD (type))
{ {
have_used_extensions = 1;
/* We need to write out info about what field this class /* We need to write out info about what field this class
uses as its "main" vtable pointer field, because if this uses as its "main" vtable pointer field, because if this
...@@ -2179,7 +2157,6 @@ dbxout_type (tree type, int full) ...@@ -2179,7 +2157,6 @@ dbxout_type (tree type, int full)
if (use_gnu_debug_info_extensions if (use_gnu_debug_info_extensions
&& TYPE_PRECISION (type) != TYPE_PRECISION (integer_type_node)) && TYPE_PRECISION (type) != TYPE_PRECISION (integer_type_node))
{ {
have_used_extensions = 1;
stabstr_S ("@s"); stabstr_S ("@s");
stabstr_D (TYPE_PRECISION (type)); stabstr_D (TYPE_PRECISION (type));
stabstr_C (';'); stabstr_C (';');
...@@ -2215,7 +2192,6 @@ dbxout_type (tree type, int full) ...@@ -2215,7 +2192,6 @@ dbxout_type (tree type, int full)
case METHOD_TYPE: case METHOD_TYPE:
if (use_gnu_debug_info_extensions) if (use_gnu_debug_info_extensions)
{ {
have_used_extensions = 1;
stabstr_C ('#'); stabstr_C ('#');
/* Write the argument types out longhand. */ /* Write the argument types out longhand. */
...@@ -2233,7 +2209,6 @@ dbxout_type (tree type, int full) ...@@ -2233,7 +2209,6 @@ dbxout_type (tree type, int full)
case OFFSET_TYPE: case OFFSET_TYPE:
if (use_gnu_debug_info_extensions) if (use_gnu_debug_info_extensions)
{ {
have_used_extensions = 1;
stabstr_C ('@'); stabstr_C ('@');
dbxout_type (TYPE_OFFSET_BASETYPE (type), 0); dbxout_type (TYPE_OFFSET_BASETYPE (type), 0);
stabstr_C (','); stabstr_C (',');
...@@ -2247,7 +2222,6 @@ dbxout_type (tree type, int full) ...@@ -2247,7 +2222,6 @@ dbxout_type (tree type, int full)
case REFERENCE_TYPE: case REFERENCE_TYPE:
if (use_gnu_debug_info_extensions) if (use_gnu_debug_info_extensions)
{ {
have_used_extensions = 1;
stabstr_C ('&'); stabstr_C ('&');
} }
else else
...@@ -2523,7 +2497,7 @@ dbxout_symbol (tree decl, int local ATTRIBUTE_UNUSED) ...@@ -2523,7 +2497,7 @@ dbxout_symbol (tree decl, int local ATTRIBUTE_UNUSED)
|| TREE_CODE (type) == UNION_TYPE || TREE_CODE (type) == UNION_TYPE
|| TREE_CODE (type) == QUAL_UNION_TYPE) || TREE_CODE (type) == QUAL_UNION_TYPE)
&& TYPE_NAME (type) == decl && TYPE_NAME (type) == decl
&& !(use_gnu_debug_info_extensions && have_used_extensions) && !use_gnu_debug_info_extensions
&& !TREE_ASM_WRITTEN (TYPE_NAME (type)) && !TREE_ASM_WRITTEN (TYPE_NAME (type))
/* Distinguish the implicit typedefs of C++ /* Distinguish the implicit typedefs of C++
from explicit ones that might be found in C. */ from explicit ones that might be found in C. */
...@@ -2549,11 +2523,7 @@ dbxout_symbol (tree decl, int local ATTRIBUTE_UNUSED) ...@@ -2549,11 +2523,7 @@ dbxout_symbol (tree decl, int local ATTRIBUTE_UNUSED)
dbxout_begin_complex_stabs (); dbxout_begin_complex_stabs ();
/* Output leading class/struct qualifiers. /* Output leading class/struct qualifiers. */
??? why not set have_used_extensions here ... because
then the test of it below would always be true, I
guess. But it's not clear to me why we shouldn't do
that always in extended mode. */
if (use_gnu_debug_info_extensions) if (use_gnu_debug_info_extensions)
dbxout_class_name_qualifiers (decl); dbxout_class_name_qualifiers (decl);
...@@ -2570,7 +2540,7 @@ dbxout_symbol (tree decl, int local ATTRIBUTE_UNUSED) ...@@ -2570,7 +2540,7 @@ dbxout_symbol (tree decl, int local ATTRIBUTE_UNUSED)
from explicit ones that might be found in C. */ from explicit ones that might be found in C. */
&& DECL_ARTIFICIAL (decl)) && DECL_ARTIFICIAL (decl))
{ {
if (use_gnu_debug_info_extensions && have_used_extensions) if (use_gnu_debug_info_extensions)
{ {
stabstr_C ('T'); stabstr_C ('T');
TREE_ASM_WRITTEN (TYPE_NAME (type)) = 1; TREE_ASM_WRITTEN (TYPE_NAME (type)) = 1;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment