summaryrefslogtreecommitdiff
path: root/tiger-compiler/src/astclone/tasks.cc
blob: ae6d973c652c8e2f00854e5689848017a3663d9d (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
/**
 ** \file astclone/tasks.cc
 ** \brief Astclone module related tasks' implementation.
 **/

#include <ast/tasks.hh>

#include <astclone/libastclone.hh>
#define DEFINE_TASKS 1
#include <astclone/tasks.hh>
#undef DEFINE_TASKS

#include <common.hh>

namespace astclone::tasks
{
  void clone()
  {
    ast::ChunkList* ds = ::astclone::clone(*ast::tasks::the_program);
    if (!ds)
      task_error() << misc::error::error_type::failure << "Cloning Failed\n"
                   << &misc::error::exit;
    ast::tasks::the_program.reset(ds);
  }

} // namespace astclone::tasks