sammine-lang
Loading...
Searching...
No Matches
TypeConverter.h
Go to the documentation of this file.
1#pragma once
2#include "codegen/LLVMRes.h"
3#include "lex/Token.h"
4#include "typecheck/Types.h"
5#include "util/Utilities.h"
6#include <llvm/IR/Instructions.h>
7#include <llvm/IR/LLVMContext.h>
8#include <llvm/IR/Type.h>
9
13namespace sammine_lang::AST {
14class TypeConverter {
15
16 llvm::LLVMContext &context;
17
18public:
19 llvm::Type *get_type(Type t);
20 llvm::Type *get_return_type(Type t);
21 llvm::CmpInst::Predicate get_cmp_func(Type a, Type b, TokenType tok);
22
23 TypeConverter(LLVMRes &resPtr) : context(*resPtr.Context.get()) {}
24};
25} // namespace sammine_lang::AST
Defined LLVMRes, which encapsulates the state of LLVM (Context, Modules, IRBuilder,...
Defines the token structure (TokenType, TokStream, TokenMap)
Defines the core Type system for Sammine.
Holds classes and functionalities for dealing with Error handling, source locations caching & indexin...
Definition LLVMRes.h:39
Definition Types.h:46