summaryrefslogtreecommitdiff
path: root/src/compiler/compiler.h
blob: 6e946119d8ce882e34e0af53e4dc0c21b019cd91 (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
#ifndef COAL_COMPILER_H
#define COAL_COMPILER_H

#include <clang/Frontend/CompilerInstance.h>

namespace llvm {
   class Module;
}

namespace Coal {
   class Compiler
   {
   public:
      Compiler();
      ~Compiler();

      llvm::Module *compile(const std::string &text);

   private:
      bool init();

   private:
      clang::CompilerInstance m_clang;
   };
}

#endif