Be able to handle complex64 and complex128 types

No support for complex types yet, but at least be able to handle their
types.
This commit is contained in:
Ayke van Laethem
2018-08-31 21:30:21 +02:00
parent 94ce893ab4
commit 887814a69d
+4
View File
@@ -459,6 +459,10 @@ func (c *Compiler) getLLVMType(goType types.Type) (llvm.Type, error) {
return llvm.FloatType(), nil
case types.Float64:
return llvm.DoubleType(), nil
case types.Complex64:
return llvm.VectorType(llvm.FloatType(), 2), nil
case types.Complex128:
return llvm.VectorType(llvm.DoubleType(), 2), nil
case types.String:
return c.mod.GetTypeByName("runtime._string"), nil
case types.Uintptr: