write codegen, ready to debug

This commit is contained in:
2024-08-28 15:28:04 +00:00
parent f93e9f481c
commit ce905d7021
6 changed files with 101 additions and 21 deletions

View File

@ -108,11 +108,17 @@ class LLVMIRIntType {
size_t bits;
LLVMIRIntType() = default;
LLVMIRIntType(size_t bits) : bits(bits) {}
bool operator==(const LLVMIRIntType &r) const { return bits == r.bits; }
};
struct LLVMIRPTRType {
bool operator==(const LLVMIRPTRType &r) const { return true; }
};
struct LLVMVOIDType {
bool operator==(const LLVMVOIDType &r) const { return true; }
};
struct LLVMIRPTRType {};
struct LLVMVOIDType {};
struct LLVMIRCLASSTYPE {
std::string class_name_full;
bool operator==(const LLVMIRCLASSTYPE &r) const { return class_name_full == r.class_name_full; }
};
using LLVMType = std::variant<LLVMIRIntType, LLVMIRPTRType, LLVMVOIDType, LLVMIRCLASSTYPE>;
class IRClassInfo {