diff options
| author | _ov4 <hausemasterstream@gmail.com> | 2026-02-02 08:45:01 +0000 |
|---|---|---|
| committer | _ov4 <hausemasterstream@gmail.com> | 2026-02-02 08:45:01 +0000 |
| commit | 419420770c4545ea4010047ef2153004d4700eed (patch) | |
| tree | bd19eed681dbb68ecb501b6cfc220c42a9803ef3 /include/cps/IntegerHandler.h | |
| parent | ecc0fc463ba54dd0cbe33bc14415f432eaa959de (diff) | |
Added REAL and BOOLEAN types, DIV and MOD operators
Diffstat (limited to 'include/cps/IntegerHandler.h')
| -rw-r--r-- | include/cps/IntegerHandler.h | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/include/cps/IntegerHandler.h b/include/cps/IntegerHandler.h new file mode 100644 index 0000000..2cd0bbc --- /dev/null +++ b/include/cps/IntegerHandler.h @@ -0,0 +1,24 @@ +#pragma once +#include "llvm/IR/IRBuilder.h" +#include "llvm/IR/LLVMContext.h" +#include "llvm/IR/Module.h" +#include <map> +#include <string> + +namespace cps { + +class IntegerHandler { + llvm::LLVMContext &Context; + llvm::IRBuilder<> &Builder; + llvm::Module &Module; + std::map<std::string, llvm::Value*> &NamedValues; + +public: + IntegerHandler(llvm::LLVMContext &Ctx, llvm::IRBuilder<> &B, llvm::Module &M, std::map<std::string, llvm::Value*> &NV) + : Context(Ctx), Builder(B), Module(M), NamedValues(NV) {} + + void emitDeclare(const std::string &Name); + llvm::Value *createLiteral(int64_t Val); +}; + +} |
