1 /* d-frontend.h -- D frontend interface to the gcc back-end.
2 Copyright (C) 2019-2023 Free Software Foundation, Inc.
4 GCC is free software; you can redistribute it and/or modify
5 it under the terms of the GNU General Public License as published by
6 the Free Software Foundation; either version 3, or (at your option)
9 GCC is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU General Public License for more details.
14 You should have received a copy of the GNU General Public License
15 along with GCC; see the file COPYING3. If not see
16 <http://www.gnu.org/licenses/>. */
18 #ifndef GCC_D_FRONTEND_H
19 #define GCC_D_FRONTEND_H
21 /* These functions are defined in D runtime. */
22 extern "C" int rt_init (void);
23 extern "C" int rt_term (void);
24 extern "C" void gc_disable (void);
25 extern "C" void *gc_malloc (size_t sz
, unsigned ba
= 0, const void *ti
= NULL
);
26 extern "C" void gc_free (void *);
27 extern "C" void gc_collect (void);
33 void *ptr
= gc_malloc (sizeof (T
));