Proteus
Programmable JIT compilation and optimization for C/C++ using LLVM
Loading...
Searching...
No Matches
CompiledLibrary.hpp
Go to the documentation of this file.
1#ifndef PROTEUS_COMPILED_LIBRARY_HPP
2#define PROTEUS_COMPILED_LIBRARY_HPP
3
4#include <memory>
5#include <string>
6
7namespace llvm {
8class MemoryBuffer;
9namespace orc {
10class JITDylib;
11} // namespace orc
12} // namespace llvm
13
14namespace proteus {
15
16using namespace llvm;
17
19 // Compiled library holds a relocatable object or a dynamic library, indicated
20 // by IsDynLib.
21 std::unique_ptr<MemoryBuffer> ObjectModule;
22 std::string DynLibPath;
24 bool IsLoaded = false;
25 // JitDyLib holds a pointer to the ORC JIT dynamic library context for the
26 // host JIT engine.
27 llvm::orc::JITDylib *JitDyLib = nullptr;
28
29 CompiledLibrary(std::unique_ptr<MemoryBuffer> ObjectModule);
30
31 CompiledLibrary(const std::string &Path);
32
34
35 bool isSharedObject() const { return IsDynLib; }
36
37 bool isStaticObject() const { return !IsDynLib; }
38};
39
40} // namespace proteus
41
42#endif
Definition Helpers.h:141
Definition ObjectCacheChain.cpp:26
Definition CompiledLibrary.hpp:18
std::unique_ptr< MemoryBuffer > ObjectModule
Definition CompiledLibrary.hpp:21
bool isStaticObject() const
Definition CompiledLibrary.hpp:37
bool isSharedObject() const
Definition CompiledLibrary.hpp:35
bool IsDynLib
Definition CompiledLibrary.hpp:23
llvm::orc::JITDylib * JitDyLib
Definition CompiledLibrary.hpp:27
std::string DynLibPath
Definition CompiledLibrary.hpp:22
bool IsLoaded
Definition CompiledLibrary.hpp:24