diff options
author | Indu Bhagat <indu.bhagat@oracle.com> | 2022-04-14 10:00:25 -0700 |
---|---|---|
committer | Indu Bhagat <indu.bhagat@oracle.com> | 2022-04-14 10:00:25 -0700 |
commit | 613a6fca75156aadc2e79d78a23e547d39762c1e (patch) | |
tree | 7746f8b711c23e0682e84f9f59c47fa67587c979 /gcc/ctfout.cc | |
parent | 3fc22eedb033cbff1bf5a70c6a032d3c5ce2d867 (diff) | |
download | gcc-613a6fca75156aadc2e79d78a23e547d39762c1e.zip gcc-613a6fca75156aadc2e79d78a23e547d39762c1e.tar.gz gcc-613a6fca75156aadc2e79d78a23e547d39762c1e.tar.bz2 |
ctfc: get rid of the static variable in ctf_list_add_ctf_vars ()
2022-04-14 Indu Bhagat <indu.bhagat@oracle.com>
gcc/ChangeLog:
* ctfc.h (struct ctf_container): Introduce a new member.
* ctfout.cc (ctf_list_add_ctf_vars): Use it instead of static
variable.
Diffstat (limited to 'gcc/ctfout.cc')
-rw-r--r-- | gcc/ctfout.cc | 4 |
1 files changed, 1 insertions, 3 deletions
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. */ |