summaryrefslogtreecommitdiff
path: root/tiger-compiler/src/llvmtranslate/tasks.hh
diff options
context:
space:
mode:
Diffstat (limited to 'tiger-compiler/src/llvmtranslate/tasks.hh')
-rw-r--r--tiger-compiler/src/llvmtranslate/tasks.hh34
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