fixed: added missing header func.h

This commit is contained in:
Sven Vogel 2024-05-28 22:10:04 +02:00
parent f9eacef52f
commit 28a4f619a0
1 changed files with 27 additions and 0 deletions

27
src/llvm/func.h Normal file
View File

@ -0,0 +1,27 @@
#ifndef LLVM_BACKEND_FUNC_H_
#define LLVM_BACKEND_FUNC_H_
#include <llvm/parser.h>
#include <glib.h>
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_