summaryrefslogtreecommitdiff
path: root/gcc/ggc-none.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/ggc-none.c')
-rw-r--r--gcc/ggc-none.c31
1 files changed, 8 insertions, 23 deletions
diff --git a/gcc/ggc-none.c b/gcc/ggc-none.c
index 4e9ef4aacd7..e05107ec8db 100644
--- a/gcc/ggc-none.c
+++ b/gcc/ggc-none.c
@@ -35,28 +35,13 @@
/* For now, keep using the old obstack scheme in the gen* programs. */
int ggc_p = 0;
-rtx
-ggc_alloc_rtx (nslots)
- int nslots;
+void *
+ggc_alloc_obj (size, zero)
+ size_t size;
+ int zero;
{
- int size = sizeof(struct rtx_def) + (nslots - 1) * sizeof(rtunion);
- rtx n;
-
- n = (rtx) xmalloc (size);
- bzero ((char *) n, size);
-
- return n;
-}
-
-rtvec
-ggc_alloc_rtvec (nelt)
- int nelt;
-{
- int size = sizeof (struct rtvec_def) + (nelt - 1) * sizeof (rtx);
- rtvec v;
-
- v = (rtvec) xmalloc (size);
- bzero ((char *) v, size);
-
- return v;
+ void *p = xmalloc (size);
+ if (zero)
+ memset (p, 0, size);
+ return p;
}