From 28a4f619a0f035164ed27acc4e2ae47ec5cc54b9 Mon Sep 17 00:00:00 2001 From: servostar Date: Tue, 28 May 2024 22:10:04 +0200 Subject: [PATCH] fixed: added missing header func.h --- src/llvm/func.h | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 src/llvm/func.h diff --git a/src/llvm/func.h b/src/llvm/func.h new file mode 100644 index 0000000..ac27a83 --- /dev/null +++ b/src/llvm/func.h @@ -0,0 +1,27 @@ + +#ifndef LLVM_BACKEND_FUNC_H_ +#define LLVM_BACKEND_FUNC_H_ + +#include + +#include + +typedef struct LLVMFuncScope_t { + LLVMGlobalScope* global_scope; + // of LLVMTypeRef + GHashTable* params; + LLVMValueRef llvm_func; +} LLVMFuncScope; + +typedef struct LLVMLocalScope_t LLVMLocalScope; + +typedef struct LLVMLocalScope_t { + // of LLVMTypeRef + GHashTable* vars; + LLVMFuncScope* func_scope; + LLVMLocalScope* parent_scope; +} LLVMLocalScope; + +LLVMValueRef get_variable(const LLVMLocalScope* scope, const char* name); + +#endif // LLVM_BACKEND_FUNC_H_