Be able to handle complex64 and complex128 types
No support for complex types yet, but at least be able to handle their types.
Этот коммит содержится в:
родитель
94ce893ab4
коммит
887814a69d
1 изменённых файлов: 4 добавлений и 0 удалений
|
@ -459,6 +459,10 @@ func (c *Compiler) getLLVMType(goType types.Type) (llvm.Type, error) {
|
||||||
return llvm.FloatType(), nil
|
return llvm.FloatType(), nil
|
||||||
case types.Float64:
|
case types.Float64:
|
||||||
return llvm.DoubleType(), nil
|
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:
|
case types.String:
|
||||||
return c.mod.GetTypeByName("runtime._string"), nil
|
return c.mod.GetTypeByName("runtime._string"), nil
|
||||||
case types.Uintptr:
|
case types.Uintptr:
|
||||||
|
|
Загрузка…
Создание таблицы
Сослаться в новой задаче