aboutsummaryrefslogtreecommitdiff
path: root/include/cps/ArrayHandler.h
diff options
context:
space:
mode:
author_ov4 <hausemasterstream@gmail.com>2026-01-30 13:28:45 +0000
committer_ov4 <hausemasterstream@gmail.com>2026-01-30 13:28:45 +0000
commit93175ba5edb0eacc182f573c4fd4556f089da305 (patch)
tree0e50d5e0b50d7298dcb50342583fe4b718ccd1c0 /include/cps/ArrayHandler.h
parentbd799e42b40613983c6e3cb9aedf58866ac68605 (diff)
Added BYREF and BYVAL
Diffstat (limited to 'include/cps/ArrayHandler.h')
-rw-r--r--include/cps/ArrayHandler.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/include/cps/ArrayHandler.h b/include/cps/ArrayHandler.h
index 734f464..1ee91db 100644
--- a/include/cps/ArrayHandler.h
+++ b/include/cps/ArrayHandler.h
@@ -24,7 +24,7 @@ class ArrayHandler {
llvm::LLVMContext *TheContext;
llvm::IRBuilder<> *Builder;
llvm::Module *TheModule;
- std::map<std::string, llvm::AllocaInst*> *NamedValues;
+ std::map<std::string, llvm::Value*> *NamedValues;
std::map<std::string, ArrayMetadata> ArrayTable;
RuntimeCheck &RuntimeChecker;
@@ -37,13 +37,13 @@ class ArrayHandler {
void emitPrintLoop(const std::string &Name, int CurrentDim, std::vector<llvm::Value*> CurrentIndices, llvm::FunctionCallee PrintfFunc, llvm::Value* FmtStr);
public:
- ArrayHandler(llvm::LLVMContext &C, llvm::IRBuilder<> &B, llvm::Module &M, std::map<std::string, llvm::AllocaInst*> &NV);
+ ArrayHandler(llvm::LLVMContext &C, llvm::IRBuilder<> &B, llvm::Module &M, std::map<std::string, llvm::Value*> &NV);
void setupExternalFunctions();
void emitArrayDeclare(ArrayDeclareStmtAST *Stmt, CodeGen &CG);
void emitArrayAssign(ArrayAssignStmtAST *Stmt, CodeGen &CG);
- ArrayHandler(llvm::LLVMContext &C, llvm::IRBuilder<> &B, llvm::Module &M, std::map<std::string, llvm::AllocaInst*> &NV, RuntimeCheck &RC);
+ ArrayHandler(llvm::LLVMContext &C, llvm::IRBuilder<> &B, llvm::Module &M, std::map<std::string, llvm::Value*> &NV, RuntimeCheck &RC);
llvm::Value* emitArrayAccess(ArrayAccessExprAST *Expr, CodeGen &CG);