summaryrefslogtreecommitdiff
path: root/tiger-compiler/src/llvmtranslate/tasks.hh
blob: ade231adc5353edf6fdc104548866b24513be467 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
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