From f2b051ae3e28135cc02589f3f698c43743cca48e Mon Sep 17 00:00:00 2001 From: _ov4 Date: Fri, 27 Mar 2026 01:50:32 +0000 Subject: feat: generalize typed array support --- include/cps/FunctionGen.h | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) (limited to 'include/cps/FunctionGen.h') 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 #include #include @@ -14,15 +15,21 @@ class FunctionGen { llvm::LLVMContext &Context; llvm::Module &Module; llvm::IRBuilder<> &Builder; + TypeSystem &Types; std::map &NamedValues; + std::map &Symbols; void createArgumentAllocas(llvm::Function *F, const std::vector> &Args); public: - FunctionGen(llvm::LLVMContext &C, llvm::Module &M, llvm::IRBuilder<> &B, - std::map &NV) - : Context(C), Module(M), Builder(B), NamedValues(NV) {} + FunctionGen(llvm::LLVMContext &C, + llvm::Module &M, + llvm::IRBuilder<> &B, + TypeSystem &TS, + std::map &NV, + std::map &Sym) + : Context(C), Module(M), Builder(B), Types(TS), NamedValues(NV), Symbols(Sym) {} llvm::Type *getLLVMType(const std::string &TypeName); -- cgit v1.3.1-4-g156e