Proteus
Programmable JIT compilation and optimization for C/C++ using LLVM
Loading...
Searching...
No Matches
CompilerSync.hpp
Go to the documentation of this file.
1#ifndef PROTEUS_SYNC_COMPILER_HPP
2#define PROTEUS_SYNC_COMPILER_HPP
3
4#include <llvm/ExecutionEngine/Orc/ThreadSafeModule.h>
5
7#include "proteus/Debug.h"
8#include "proteus/Hashing.hpp"
9
10namespace proteus {
11
12using namespace llvm;
13
15public:
17 static CompilerSync Singleton;
18 return Singleton;
19 }
20
21 std::unique_ptr<MemoryBuffer> compile(CompilationTask &&CT) {
22 return CT.compile();
23 }
24
25private:
26 CompilerSync() {}
27
28 ~CompilerSync() {}
29};
30
31} // namespace proteus
32
33#endif
Definition CompilationTask.hpp:17
Definition CompilerSync.hpp:14
std::unique_ptr< MemoryBuffer > compile(CompilationTask &&CT)
Definition CompilerSync.hpp:21
static CompilerSync & instance()
Definition CompilerSync.hpp:16
Definition JitEngine.cpp:20