Mercurial > hg > CbC > CbC_gcc
comparison gcc/sdbout.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 |
---|---|
46 #include "coretypes.h" | 46 #include "coretypes.h" |
47 #include "tm.h" | 47 #include "tm.h" |
48 #include "debug.h" | 48 #include "debug.h" |
49 #include "tree.h" | 49 #include "tree.h" |
50 #include "ggc.h" | 50 #include "ggc.h" |
51 #include "varray.h" | 51 #include "vec.h" |
52 | 52 |
53 static GTY(()) tree anonymous_types; | 53 static GTY(()) tree anonymous_types; |
54 | 54 |
55 /* Counter to generate unique "names" for nameless struct members. */ | 55 /* Counter to generate unique "names" for nameless struct members. */ |
56 | 56 |
57 static GTY(()) int unnamed_struct_number; | 57 static GTY(()) int unnamed_struct_number; |
58 | 58 |
59 /* Declarations whose debug info was deferred till end of compilation. */ | 59 /* Declarations whose debug info was deferred till end of compilation. */ |
60 | 60 |
61 static GTY(()) varray_type deferred_global_decls; | 61 static GTY(()) VEC(tree,gc) *deferred_global_decls; |
62 | 62 |
63 /* The C front end may call sdbout_symbol before sdbout_init runs. | 63 /* The C front end may call sdbout_symbol before sdbout_init runs. |
64 We save all such decls in this list and output them when we get | 64 We save all such decls in this list and output them when we get |
65 to sdbout_init. */ | 65 to sdbout_init. */ |
66 | 66 |
1462 And that can screw up the symbol ordering. Defer those for | 1462 And that can screw up the symbol ordering. Defer those for |
1463 sdbout_finish (). */ | 1463 sdbout_finish (). */ |
1464 if (!DECL_INITIAL (decl) || !TREE_PUBLIC (decl)) | 1464 if (!DECL_INITIAL (decl) || !TREE_PUBLIC (decl)) |
1465 sdbout_symbol (decl, 0); | 1465 sdbout_symbol (decl, 0); |
1466 else | 1466 else |
1467 VARRAY_PUSH_TREE (deferred_global_decls, decl); | 1467 VEC_safe_push (tree, gc, deferred_global_decls, decl); |
1468 | 1468 |
1469 /* Output COFF information for non-global file-scope initialized | 1469 /* Output COFF information for non-global file-scope initialized |
1470 variables. */ | 1470 variables. */ |
1471 if (DECL_INITIAL (decl) && MEM_P (DECL_RTL (decl))) | 1471 if (DECL_INITIAL (decl) && MEM_P (DECL_RTL (decl))) |
1472 sdbout_toplevel_data (decl); | 1472 sdbout_toplevel_data (decl); |
1478 | 1478 |
1479 static void | 1479 static void |
1480 sdbout_finish (const char *main_filename ATTRIBUTE_UNUSED) | 1480 sdbout_finish (const char *main_filename ATTRIBUTE_UNUSED) |
1481 { | 1481 { |
1482 size_t i; | 1482 size_t i; |
1483 | 1483 tree decl; |
1484 for (i = 0; i < VARRAY_ACTIVE_SIZE (deferred_global_decls); i++) | 1484 |
1485 sdbout_symbol (VARRAY_TREE (deferred_global_decls, i), 0); | 1485 for (i = 0; VEC_iterate (tree, deferred_global_decls, i, decl); i++) |
1486 sdbout_symbol (decl, 0); | |
1486 } | 1487 } |
1487 | 1488 |
1488 /* Describe the beginning of an internal block within a function. | 1489 /* Describe the beginning of an internal block within a function. |
1489 Also output descriptions of variables defined in this block. | 1490 Also output descriptions of variables defined in this block. |
1490 | 1491 |
1687 current_file = XNEW (struct sdb_file); | 1688 current_file = XNEW (struct sdb_file); |
1688 current_file->next = NULL; | 1689 current_file->next = NULL; |
1689 current_file->name = input_file_name; | 1690 current_file->name = input_file_name; |
1690 #endif | 1691 #endif |
1691 | 1692 |
1692 VARRAY_TREE_INIT (deferred_global_decls, 12, "deferred_global_decls"); | 1693 deferred_global_decls = VEC_alloc (tree, gc, 12); |
1693 | 1694 |
1694 /* Emit debug information which was queued by sdbout_symbol before | 1695 /* Emit debug information which was queued by sdbout_symbol before |
1695 we got here. */ | 1696 we got here. */ |
1696 sdbout_initialized = true; | 1697 sdbout_initialized = true; |
1697 | 1698 |