diff options
| author | Martial Simon <msimon_fr@hotmail.com> | 2025-09-15 01:07:58 +0200 |
|---|---|---|
| committer | Martial Simon <msimon_fr@hotmail.com> | 2025-09-15 01:07:58 +0200 |
| commit | 967be9e750221ab2ab783f95df79bb26d290a45e (patch) | |
| tree | 6802900a5e975f9f68b169f0f503f040056d6952 /tiger-compiler/src/common.hh | |
Diffstat (limited to 'tiger-compiler/src/common.hh')
| -rw-r--r-- | tiger-compiler/src/common.hh | 49 |
1 files changed, 49 insertions, 0 deletions
diff --git a/tiger-compiler/src/common.hh b/tiger-compiler/src/common.hh new file mode 100644 index 0000000..ca647a9 --- /dev/null +++ b/tiger-compiler/src/common.hh @@ -0,0 +1,49 @@ +/** + ** \file src/common.hh + ** \brief Definitions common to the whole task system. + ** + ** These variables are global. As such they should not be used + ** in the libraries, but only in the "imperative" subsystem: the + ** tasks. + */ + +#pragma once + +#include <misc/error.hh> +#include <misc/timer.hh> + +#ifdef SWIG +// Warning 451: Setting a const char * variable may leak memory. +%warnfilter(451) program_name; +%warnfilter(451) program_version; +%warnfilter(451) program_bug_address; +%warnfilter(451) program_doc; +%warnfilter(451) program_args_doc; +%warnfilter(451) filename; +#endif /* ! SWIG */ + +/// \name Program identity. +/// \{ +/// Name of this program. +extern const char* program_name; + +/// Version string of this program. +extern const char* program_version; + +/// Bug report address of this program. +extern const char* program_bug_address; + +/// Describe program and accepted arguments. +extern const char* program_doc; +extern const char* program_args_doc; + +/// \} + +/// Timing the tasks. +extern misc::timer task_timer; + +/// Sole argument: the file to process. +extern const char* filename; + +/// The current state of error. +extern misc::error& task_error(); |
