diff options
| author | _ov4 <hausemasterstream@gmail.com> | 2026-03-27 01:50:32 +0000 |
|---|---|---|
| committer | _ov4 <hausemasterstream@gmail.com> | 2026-03-27 01:50:32 +0000 |
| commit | f2b051ae3e28135cc02589f3f698c43743cca48e (patch) | |
| tree | 91582f514eda6665c8283875dd0b3ee491cc62ea /include/cps/FunctionGen.h | |
| parent | 15f30a397a222e9256d41e8b8a7b6fff454b02da (diff) | |
feat: generalize typed array support
Diffstat (limited to 'include/cps/FunctionGen.h')
| -rw-r--r-- | include/cps/FunctionGen.h | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/include/cps/FunctionGen.h b/include/cps/FunctionGen.h index 84a2858..7ebb7f4 100644 --- a/include/cps/FunctionGen.h +++ b/include/cps/FunctionGen.h @@ -2,6 +2,7 @@ #include "llvm/IR/IRBuilder.h" #include "llvm/IR/Module.h" #include "cps/FunctionAST.h" +#include "cps/TypeSystem.h" #include <map> #include <vector> #include <functional> @@ -14,15 +15,21 @@ class FunctionGen { llvm::LLVMContext &Context; llvm::Module &Module; llvm::IRBuilder<> &Builder; + TypeSystem &Types; std::map<std::string, llvm::Value*> &NamedValues; + std::map<std::string, SymbolInfo> &Symbols; void createArgumentAllocas(llvm::Function *F, const std::vector<std::tuple<std::string, std::string, bool>> &Args); public: - FunctionGen(llvm::LLVMContext &C, llvm::Module &M, llvm::IRBuilder<> &B, - std::map<std::string, llvm::Value*> &NV) - : Context(C), Module(M), Builder(B), NamedValues(NV) {} + FunctionGen(llvm::LLVMContext &C, + llvm::Module &M, + llvm::IRBuilder<> &B, + TypeSystem &TS, + std::map<std::string, llvm::Value*> &NV, + std::map<std::string, SymbolInfo> &Sym) + : Context(C), Module(M), Builder(B), Types(TS), NamedValues(NV), Symbols(Sym) {} llvm::Type *getLLVMType(const std::string &TypeName); |
