| 1 |
/* m2builtins.h header file for m2builtins.cc. |
| 2 |
|
| 3 |
Copyright (C) 2012-2025 Free Software Foundation, Inc. |
| 4 |
Contributed by Gaius Mulley <[email protected]>. |
| 5 |
|
| 6 |
This file is part of GNU Modula-2. |
| 7 |
|
| 8 |
GNU Modula-2 is free software; you can redistribute it and/or modify |
| 9 |
it under the terms of the GNU General Public License as published by |
| 10 |
the Free Software Foundation; either version 3, or (at your option) |
| 11 |
any later version. |
| 12 |
|
| 13 |
GNU Modula-2 is distributed in the hope that it will be useful, but |
| 14 |
WITHOUT ANY WARRANTY; without even the implied warranty of |
| 15 |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
| 16 |
General Public License for more details. |
| 17 |
|
| 18 |
You should have received a copy of the GNU General Public License |
| 19 |
along with GNU Modula-2; see the file COPYING3. If not see |
| 20 |
<http://www.gnu.org/licenses/>. */ |
| 21 |
|
| 22 |
#if !defined(m2builtins_h) |
| 23 |
|
| 24 |
#define m2builtins_h |
| 25 |
#if defined(m2builtins_c) |
| 26 |
#if defined(__GNUG__) |
| 27 |
#define EXTERN extern "C" |
| 28 |
#else /* !__GNUG__. */ |
| 29 |
#define EXTERN |
| 30 |
#endif /* !__GNUG__. */ |
| 31 |
#else /* !m2builtins_c. */ |
| 32 |
#if defined(__GNUG__) |
| 33 |
#define EXTERN extern "C" |
| 34 |
#else /* !__GNUG__. */ |
| 35 |
#define EXTERN extern |
| 36 |
#endif /* !__GNUG__. */ |
| 37 |
#endif /* !m2builtins_c. */ |
| 38 |
|
| 39 |
#include <stdbool.h> |
| 40 |
|
| 41 |
EXTERN tree m2builtins_GetBuiltinConst (char *name); |
| 42 |
EXTERN unsigned int m2builtins_GetBuiltinConstType (char *name); |
| 43 |
EXTERN unsigned int m2builtins_GetBuiltinTypeInfoType (const char *ident); |
| 44 |
EXTERN tree m2builtins_GetBuiltinTypeInfo (location_t location, tree type, |
| 45 |
const char *ident); |
| 46 |
EXTERN tree m2builtins_BuiltinMemCopy (location_t location, tree dest, |
| 47 |
tree src, tree n); |
| 48 |
EXTERN tree m2builtins_BuiltinMemSet (location_t location, tree dest, |
| 49 |
tree bytevalue, tree nbytes); |
| 50 |
EXTERN tree m2builtins_BuiltInAlloca (location_t location, tree n); |
| 51 |
EXTERN tree m2builtins_BuiltInIsfinite (location_t location, tree e); |
| 52 |
EXTERN bool m2builtins_BuiltinExists (char *name); |
| 53 |
EXTERN tree m2builtins_BuildBuiltinTree (location_t location, char *name); |
| 54 |
EXTERN tree m2builtins_BuiltInHugeVal (location_t location); |
| 55 |
EXTERN tree m2builtins_BuiltInHugeValShort (location_t location); |
| 56 |
EXTERN tree m2builtins_BuiltInHugeValLong (location_t location); |
| 57 |
EXTERN tree m2builtins_BuiltinStrNCopy (location_t location, tree dest, tree src, tree n); |
| 58 |
|
| 59 |
EXTERN void m2builtins_init (location_t location); |
| 60 |
|
| 61 |
#undef EXTERN |
| 62 |
#endif /* m2builtins_h. */ |