-
Notifications
You must be signed in to change notification settings - Fork 4
/
zero-to-rust-jit.h
39 lines (29 loc) · 1.26 KB
/
zero-to-rust-jit.h
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
#ifndef ZERO_TO_RUST_JIT_H
#define ZERO_TO_RUST_JIT_H
#include "llvm-c/BitReader.h"
#include "llvm-c/Core.h"
#include "llvm-c/Error.h"
#include "llvm-c/IRReader.h"
#include "llvm-c/LLJIT.h"
#include "llvm-c/Support.h"
#include "llvm-c/Target.h"
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <stdnoreturn.h>
typedef LLVMOrcJITTargetAddress ResolveFn(const char *);
const char *init(int argc, const char *argv[], LLVMOrcLLJITRef *Jit,
LLVMOrcThreadSafeContextRef *Ctx);
noreturn void shutdown(int ExitCode);
LLVMModuleRef buildModule(LLVMOrcThreadSafeContextRef Ctx);
LLVMModuleRef parseModule(const char *IRCode, LLVMOrcThreadSafeContextRef Ctx);
LLVMModuleRef loadModule(const char *FileName, LLVMOrcThreadSafeContextRef Ctx);
LLVMOrcJITDylibRef addModule(LLVMOrcLLJITRef Jit, LLVMModuleRef Mod);
void addGenerator(LLVMOrcJITDylibRef Unit, ResolveFn *Resolve);
LLVMErrorRef generator(LLVMOrcDefinitionGeneratorRef G, void *Ctx,
LLVMOrcLookupStateRef *LS, LLVMOrcLookupKind K,
LLVMOrcJITDylibRef JD, LLVMOrcJITDylibLookupFlags F,
LLVMOrcCLookupSet Names, size_t NamesCount);
void loop(int (*Sum)(int, int));
int handleError(LLVMErrorRef Err);
#endif // ZERO_TO_RUST_JIT_H