Skip to content

Commit

Permalink
oops
Browse files Browse the repository at this point in the history
  • Loading branch information
Glowman554 committed May 29, 2024
1 parent 1ff1144 commit c3e8772
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions fire/firestorm/target/llvm/llvm.go
Original file line number Diff line number Diff line change
Expand Up @@ -127,20 +127,20 @@ func (b *LLVM) datatypeToLLVM(d parser.UnnamedDatatype) types.Type {

func (b *LLVM) datatypeToSize(d parser.UnnamedDatatype) int {
if d.IsArray {
return int(b.ptrType.(*types.IntType).BitSize)
return int(b.ptrType.(*types.IntType).BitSize) / 8
}

switch d.Type {
case parser.INT:
return 8
case parser.STR:
return int(b.ptrType.(*types.IntType).BitSize)
return int(b.ptrType.(*types.IntType).BitSize) / 8
case parser.VOID:
return 0
case parser.CHR:
return 1
case parser.PTR:
return int(b.ptrType.(*types.IntType).BitSize)
return int(b.ptrType.(*types.IntType).BitSize) / 8
case parser.INT_32:
return 4
case parser.INT_16:
Expand Down

0 comments on commit c3e8772

Please sign in to comment.