aboutsummaryrefslogtreecommitdiff
path: root/include/cps/BooleanHandler.h
diff options
context:
space:
mode:
author_ov4 <hausemasterstream@gmail.com>2026-02-02 08:45:01 +0000
committer_ov4 <hausemasterstream@gmail.com>2026-02-02 08:45:01 +0000
commit419420770c4545ea4010047ef2153004d4700eed (patch)
treebd19eed681dbb68ecb501b6cfc220c42a9803ef3 /include/cps/BooleanHandler.h
parentecc0fc463ba54dd0cbe33bc14415f432eaa959de (diff)
Added REAL and BOOLEAN types, DIV and MOD operators
Diffstat (limited to 'include/cps/BooleanHandler.h')
-rw-r--r--include/cps/BooleanHandler.h24
1 files changed, 24 insertions, 0 deletions
diff --git a/include/cps/BooleanHandler.h b/include/cps/BooleanHandler.h
new file mode 100644
index 0000000..67c7778
--- /dev/null
+++ b/include/cps/BooleanHandler.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 BooleanHandler {
+ llvm::LLVMContext &Context;
+ llvm::IRBuilder<> &Builder;
+ llvm::Module &Module;
+ std::map<std::string, llvm::Value*> &NamedValues;
+
+public:
+ BooleanHandler(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(bool Val);
+};
+
+}