| 1 |
/* m2decl.h header file for m2decl.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(m2decl_h) |
| 23 |
|
| 24 |
#define m2decl_h |
| 25 |
#if defined(m2decl_c) |
| 26 |
#if defined(__GNUG__) |
| 27 |
#define EXTERN extern "C" |
| 28 |
#else /* !__GNUG__. */ |
| 29 |
#define EXTERN |
| 30 |
#endif /* !__GNUG__. */ |
| 31 |
#else /* !m2decl_c. */ |
| 32 |
#if defined(__GNUG__) |
| 33 |
#define EXTERN extern "C" |
| 34 |
#else /* !__GNUG__. */ |
| 35 |
#define EXTERN extern |
| 36 |
#endif /* !__GNUG__. */ |
| 37 |
#endif /* !m2decl_c. */ |
| 38 |
|
| 39 |
|
| 40 |
EXTERN tree m2decl_DeclareM2linkStaticInitialization (location_t location, |
| 41 |
int ScaffoldStatic); |
| 42 |
EXTERN tree m2decl_DeclareM2linkForcedModuleInitOrder (location_t location, |
| 43 |
const char *RuntimeOverride); |
| 44 |
EXTERN tree m2decl_BuildPtrToTypeString (location_t location, const char *string, tree type); |
| 45 |
EXTERN void m2decl_BuildModuleCtor (tree module_ctor); |
| 46 |
EXTERN tree m2decl_DeclareModuleCtor (tree decl); |
| 47 |
EXTERN tree m2decl_GetDeclContext (tree t); |
| 48 |
EXTERN tree m2decl_BuildStringConstant (const char *string, int length); |
| 49 |
EXTERN tree m2decl_BuildCStringConstant (const char *string, int length); |
| 50 |
EXTERN tree m2decl_BuildConstLiteralNumber (location_t location, |
| 51 |
const char *str, |
| 52 |
unsigned int base, |
| 53 |
bool issueError); |
| 54 |
EXTERN void m2decl_RememberVariables (tree l); |
| 55 |
|
| 56 |
EXTERN tree m2decl_BuildEndFunctionDeclaration ( |
| 57 |
location_t location_begin, location_t location_end, const char *name, |
| 58 |
tree returntype, bool isexternal, bool isnested, bool ispublic, |
| 59 |
bool isnoreturn); |
| 60 |
EXTERN void m2decl_BuildStartFunctionDeclaration (bool uses_varargs); |
| 61 |
EXTERN tree m2decl_BuildParameterDeclaration (location_t location, const char *name, |
| 62 |
tree type, bool isreference); |
| 63 |
EXTERN tree m2decl_DeclareKnownConstant (location_t location, tree type, |
| 64 |
tree value); |
| 65 |
EXTERN tree m2decl_DeclareKnownVariable (location_t location, const char *name, |
| 66 |
tree type, bool exported, bool imported, |
| 67 |
bool istemporary, bool isglobal, |
| 68 |
tree scope, tree initial); |
| 69 |
|
| 70 |
EXTERN tree m2decl_BuildStringConstantType (int length, const char *string, |
| 71 |
tree type); |
| 72 |
EXTERN tree m2decl_BuildIntegerConstant (int value); |
| 73 |
|
| 74 |
EXTERN int m2decl_GetBitsPerWord (void); |
| 75 |
EXTERN int m2decl_GetBitsPerUnit (void); |
| 76 |
EXTERN int m2decl_GetBitsPerInt (void); |
| 77 |
EXTERN int m2decl_GetBitsPerBitset (void); |
| 78 |
|
| 79 |
#undef EXTERN |
| 80 |
#endif /* m2decl_h. */ |