aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gcc/ctfc.h2
-rw-r--r--gcc/ctfout.cc4
2 files changed, 3 insertions, 3 deletions
diff --git a/gcc/ctfc.h b/gcc/ctfc.h
index 18c93c8..4ce756c 100644
--- a/gcc/ctfc.h
+++ b/gcc/ctfc.h
@@ -301,6 +301,8 @@ typedef struct GTY (()) ctf_container
/* List of pre-processed CTF Variables. CTF requires that the variables
appear in the sorted order of their names. */
ctf_dvdef_t ** GTY ((length ("0"))) ctfc_vars_list;
+ /* Count of pre-processed CTF Variables in the list. */
+ uint64_t ctfc_vars_list_count;
/* List of pre-processed CTF types. CTF requires that a shared type must
appear before the type that uses it. For the compiler, this means types
are emitted in sorted order of their type IDs. */
diff --git a/gcc/ctfout.cc b/gcc/ctfout.cc
index a23d377..28a873b 100644
--- a/gcc/ctfout.cc
+++ b/gcc/ctfout.cc
@@ -173,9 +173,7 @@ ctf_calc_num_vbytes (ctf_dtdef_ref ctftype)
static void
ctf_list_add_ctf_vars (ctf_container_ref ctfc, ctf_dvdef_ref var)
{
- /* FIXME - static may not fly with multiple CUs. */
- static int num_vars_added = 0;
- ctfc->ctfc_vars_list[num_vars_added++] = var;
+ ctfc->ctfc_vars_list[ctfc->ctfc_vars_list_count++] = var;
}
/* Initialize the various sections and labels for CTF output. */