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/llvmtranslate/tasks.hh | |
Diffstat (limited to 'tiger-compiler/src/llvmtranslate/tasks.hh')
| -rw-r--r-- | tiger-compiler/src/llvmtranslate/tasks.hh | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/tiger-compiler/src/llvmtranslate/tasks.hh b/tiger-compiler/src/llvmtranslate/tasks.hh new file mode 100644 index 0000000..ade231a --- /dev/null +++ b/tiger-compiler/src/llvmtranslate/tasks.hh @@ -0,0 +1,34 @@ +#pragma once + +#include <llvmtranslate/fwd.hh> +#include <task/libtask.hh> + +namespace llvmtranslate::tasks +{ + /// The global translation module of ast;:tasks::the_program. + extern std::pair<std::unique_ptr<llvm::LLVMContext>, + std::unique_ptr<llvm::Module>> + module; + + TASK_GROUP("5.5. Translation to LLVM Intermediate Representation"); + + /// Translate the AST to LLVM IR. + TASK_DECLARE("llvm-compute", + "translate to LLVM IR", + llvm_compute, + "typed desugar-for desugar-string-cmp desugar escapes-compute"); + + /// Activate displaying the runtime along with the LLVM IR. + BOOLEAN_TASK_DECLARE("llvm-runtime-display", + "enable runtime displaying" + "along with the LLVM IR", + llvm_runtime_display_p, + ""); + + /// Display the LLVM IR. + TASK_DECLARE("llvm-display", + "display the LLVM IR", + llvm_display, + "llvm-compute"); + +} // namespace llvmtranslate::tasks |
