diff options
author | Richard Guenther <rguenther@suse.de> | 2010-06-30 20:05:04 +0000 |
---|---|---|
committer | Richard Guenther <rguenther@suse.de> | 2010-06-30 20:05:04 +0000 |
commit | 2abc4a304fd71623c18110e25f80787ab517474c (patch) | |
tree | ab0634e35f34f84e476a60fe8be10ff3e7d4f18b /gcc/cp/repo.c | |
parent | 1a00539f6a8d8e30065f11f4bd7700e0189ff82c (diff) | |
parent | 558576dc4194174b62f4d976e5a9ec4ca3e71abc (diff) |
2010-06-30 Richard Guenther <rguenther@suse.de>mem-ref2
Merge from trunk r161633.
git-svn-id: https://gcc.gnu.org/svn/gcc/branches/mem-ref2@161638 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cp/repo.c')
-rw-r--r-- | gcc/cp/repo.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/gcc/cp/repo.c b/gcc/cp/repo.c index 08a4d623d40..2a08c8fa412 100644 --- a/gcc/cp/repo.c +++ b/gcc/cp/repo.c @@ -43,7 +43,7 @@ static FILE *open_repo_file (const char *); static char *afgets (FILE *); static FILE *reopen_repo_file_for_write (void); -static GTY(()) tree pending_repo; +static GTY(()) VEC(tree,gc) *pending_repo; static char *repo_name; static const char *old_args, *old_dir, *old_main; @@ -236,9 +236,10 @@ reopen_repo_file_for_write (void) void finish_repo (void) { - tree t; + tree val; char *dir, *args; FILE *repo_file; + unsigned ix; if (!flag_use_repository || flag_compare_debug) return; @@ -266,9 +267,10 @@ finish_repo (void) fprintf (repo_file, "\n"); } - for (t = pending_repo; t; t = TREE_CHAIN (t)) + for (ix = VEC_length (tree, pending_repo) - 1; + VEC_iterate (tree, pending_repo, ix, val); + ix--) { - tree val = TREE_VALUE (t); tree name = DECL_ASSEMBLER_NAME (val); char type = IDENTIFIER_REPO_CHOSEN (name) ? 'C' : 'O'; fprintf (repo_file, "%c %s\n", type, IDENTIFIER_POINTER (name)); @@ -352,7 +354,7 @@ repo_emit_p (tree decl) if (!DECL_REPO_AVAILABLE_P (decl)) { DECL_REPO_AVAILABLE_P (decl) = 1; - pending_repo = tree_cons (NULL_TREE, decl, pending_repo); + VEC_safe_push (tree, gc, pending_repo, decl); } return IDENTIFIER_REPO_CHOSEN (DECL_ASSEMBLER_NAME (decl)) ? 1 : ret; |