Attacked the code generator and added bool support.

This commit is contained in:
Samuel Hammersberg 2023-04-27 13:49:00 +02:00
parent 1a21698772
commit d026dca42f
5 changed files with 28 additions and 10 deletions

View file

@ -9,6 +9,7 @@ type2LlvmType :: MIR.Type -> LLVMType
type2LlvmType (MIR.TLit id@(TIR.Ident name)) = case name of
"Int" -> I64
"Char" -> I8
"Bool" -> I1
_ -> CustomType id
type2LlvmType (MIR.TFun t xs) = do
let (t', xs') = function2LLVMType xs [type2LlvmType t]