Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -52,10 +52,13 @@ target_link_libraries(llvm-shared INTERFACE ${LLVM_SHARED_LIBRARIES})

add_library(libbfjit STATIC
include/bfjit.h
include/bfjit_internal.h
include/bflexer.h
include/bfopt.h
include/bfparser.h
src/bfjit.c
src/bfjit_codegen.c
src/bfjit_runtime.c
src/bflexer.c
src/bfopt.c
src/bfparser.c
Expand Down
21 changes: 21 additions & 0 deletions include/bfjit_internal.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
#ifndef BFJIT_INTERNAL_H
#define BFJIT_INTERNAL_H

#include "bfjit.h"

#include <llvm-c/Core.h>
#include <llvm-c/Error.h>
#include <llvm-c/LLJIT.h>
#include <llvm-c/Orc.h>

void bf_jit_err_reset(bf_jit_err *err);
void bf_set_jit_err(bf_jit_err *err, const char *msg);
void bf_set_jit_err_from_llvm(bf_jit_err *err, LLVMErrorRef llvm_err);

LLVMModuleRef bf_build_module(LLVMContextRef ctx, const bf_program *program,
bf_jit_err *err);
int bf_opt_llvm_module(LLVMModuleRef mod, bf_jit_err *err);

LLVMOrcMaterializationUnitRef bf_create_io_symbols(LLVMOrcLLJITRef jit);

#endif
2 changes: 2 additions & 0 deletions include/bfparser.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ typedef enum bf_ir_kind {
BF_IR_OUTPUT,
BF_IR_LOOP,
BF_IR_SET_ZERO,
BF_IR_SET_CONST,
BF_IR_MULTI_ZERO,
BF_IR_SCAN,
BF_IR_MULTIPLY_LOOP
} bf_ir_kind;
Expand Down
Loading
Loading