From 419420770c4545ea4010047ef2153004d4700eed Mon Sep 17 00:00:00 2001 From: _ov4 Date: Mon, 2 Feb 2026 08:45:01 +0000 Subject: Added REAL and BOOLEAN types, DIV and MOD operators --- include/cps/IntegerHandler.h | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 include/cps/IntegerHandler.h (limited to 'include/cps/IntegerHandler.h') 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 +#include + +namespace cps { + +class IntegerHandler { + llvm::LLVMContext &Context; + llvm::IRBuilder<> &Builder; + llvm::Module &Module; + std::map &NamedValues; + +public: + IntegerHandler(llvm::LLVMContext &Ctx, llvm::IRBuilder<> &B, llvm::Module &M, std::map &NV) + : Context(Ctx), Builder(B), Module(M), NamedValues(NV) {} + + void emitDeclare(const std::string &Name); + llvm::Value *createLiteral(int64_t Val); +}; + +} -- cgit v1.3.1-4-g156e