-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathllvm.h
More file actions
49 lines (41 loc) · 1.15 KB
/
llvm.h
File metadata and controls
49 lines (41 loc) · 1.15 KB
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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
#ifndef _PHP_LLVM_H_
# define _PHP_LLVM_H_
#ifdef HAVE_CONFIG_H
# include "config.h"
#endif
#include "default.h"
#include <string>
#include <sstream>
#include <iostream>
#include <llvm/LLVMContext.h>
#include <llvm/Module.h>
#include <llvm/Bitcode/ReaderWriter.h>
#include <llvm/ExecutionEngine/ExecutionEngine.h>
#include <llvm/Support/MemoryBuffer.h>
#include <llvm/ExecutionEngine/JIT.h>
#include <llvm/Support/TargetSelect.h>
#include <llvm/Support/system_error.h>
#include <llvm/Support/SourceMgr.h>
#include <llvm/Support/raw_ostream.h>
#include <llvm/Assembly/Parser.h>
#include <llvm/Linker.h>
#include <llvm/PassManager.h>
#include <llvm/LinkAllPasses.h>
#include <llvm/Analysis/Verifier.h>
extern "C" {
#include "export.h"
}
void optimizeModule(llvm::Module *m, int optimize_level);
class LLVMResource{
protected:
llvm::LLVMContext context;
llvm::ExecutionEngine *ee;
llvm::Module *MainModule;
public:
LLVMResource();
llvm::LLVMContext &getContext();
llvm::ExecutionEngine *getExecutionEngine();
bool LinkModule(llvm::Module *Module,std::string *ErrorMsg);
~LLVMResource();
};
#endif