diff options
| author | _ov4 <hausemasterstream@gmail.com> | 2026-01-30 13:28:45 +0000 |
|---|---|---|
| committer | _ov4 <hausemasterstream@gmail.com> | 2026-01-30 13:28:45 +0000 |
| commit | 93175ba5edb0eacc182f573c4fd4556f089da305 (patch) | |
| tree | 0e50d5e0b50d7298dcb50342583fe4b718ccd1c0 /include/cps/FunctionGen.h | |
| parent | bd799e42b40613983c6e3cb9aedf58866ac68605 (diff) | |
Added BYREF and BYVAL
Diffstat (limited to 'include/cps/FunctionGen.h')
| -rw-r--r-- | include/cps/FunctionGen.h | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/include/cps/FunctionGen.h b/include/cps/FunctionGen.h index c1a6ebd..84a2858 100644 --- a/include/cps/FunctionGen.h +++ b/include/cps/FunctionGen.h @@ -6,6 +6,7 @@ #include <vector> #include <functional> #include <string> +#include <tuple> namespace cps { @@ -14,13 +15,13 @@ class FunctionGen { llvm::Module &Module; llvm::IRBuilder<> &Builder; - std::map<std::string, llvm::AllocaInst*> &NamedValues; + std::map<std::string, llvm::Value*> &NamedValues; - void createArgumentAllocas(llvm::Function *F, const std::vector<std::pair<std::string, std::string>> &Args); + 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::AllocaInst*> &NV) + std::map<std::string, llvm::Value*> &NV) : Context(C), Module(M), Builder(B), NamedValues(NV) {} llvm::Type *getLLVMType(const std::string &TypeName); |
