From 967be9e750221ab2ab783f95df79bb26d290a45e Mon Sep 17 00:00:00 2001 From: Martial Simon Date: Mon, 15 Sep 2025 01:07:58 +0200 Subject: add: added projects --- tiger-compiler/src/common.hh | 49 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 tiger-compiler/src/common.hh (limited to 'tiger-compiler/src/common.hh') 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 +#include + +#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(); -- cgit v1.2.3