The next commit will change the implementation of func values on Linux
as a result of switching to a task-based scheduler. To keep the
compiler/testdata/func.go test working as expected, switch to
WebAssembly tests.
Этот коммит содержится в:
Ayke van Laethem 2021-05-05 15:07:39 +02:00 коммит произвёл Ron Evans
родитель 8cd2a462b9
коммит 3b24fedf92
8 изменённых файлов: 15 добавлений и 15 удалений

Просмотреть файл

@ -32,7 +32,7 @@ func TestCompiler(t *testing.T) {
t.Skip("compiler tests require LLVM 11 or above, got LLVM ", llvm.Version) t.Skip("compiler tests require LLVM 11 or above, got LLVM ", llvm.Version)
} }
target, err := compileopts.LoadTarget("i686--linux") target, err := compileopts.LoadTarget("wasm")
if err != nil { if err != nil {
t.Fatal("failed to load target:", err) t.Fatal("failed to load target:", err)
} }

4
compiler/testdata/basic.ll предоставленный
Просмотреть файл

@ -1,7 +1,7 @@
; ModuleID = 'basic.go' ; ModuleID = 'basic.go'
source_filename = "basic.go" source_filename = "basic.go"
target datalayout = "e-m:e-p:32:32-p270:32:32-p271:32:32-p272:64:64-f64:32:64-f80:32-n8:16:32-S128" target datalayout = "e-m:e-p:32:32-i64:64-n32:64-S128"
target triple = "i686--linux" target triple = "wasm32--wasi"
declare noalias nonnull i8* @runtime.alloc(i32, i8*, i8*) declare noalias nonnull i8* @runtime.alloc(i32, i8*, i8*)

4
compiler/testdata/float.ll предоставленный
Просмотреть файл

@ -1,7 +1,7 @@
; ModuleID = 'float.go' ; ModuleID = 'float.go'
source_filename = "float.go" source_filename = "float.go"
target datalayout = "e-m:e-p:32:32-p270:32:32-p271:32:32-p272:64:64-f64:32:64-f80:32-n8:16:32-S128" target datalayout = "e-m:e-p:32:32-i64:64-n32:64-S128"
target triple = "i686--linux" target triple = "wasm32--wasi"
declare noalias nonnull i8* @runtime.alloc(i32, i8*, i8*) declare noalias nonnull i8* @runtime.alloc(i32, i8*, i8*)

4
compiler/testdata/func.ll предоставленный
Просмотреть файл

@ -1,7 +1,7 @@
; ModuleID = 'func.go' ; ModuleID = 'func.go'
source_filename = "func.go" source_filename = "func.go"
target datalayout = "e-m:e-p:32:32-p270:32:32-p271:32:32-p272:64:64-f64:32:64-f80:32-n8:16:32-S128" target datalayout = "e-m:e-p:32:32-i64:64-n32:64-S128"
target triple = "i686--linux" target triple = "wasm32--wasi"
%runtime.funcValueWithSignature = type { i32, i8* } %runtime.funcValueWithSignature = type { i32, i8* }

4
compiler/testdata/interface.ll предоставленный
Просмотреть файл

@ -1,7 +1,7 @@
; ModuleID = 'interface.go' ; ModuleID = 'interface.go'
source_filename = "interface.go" source_filename = "interface.go"
target datalayout = "e-m:e-p:32:32-p270:32:32-p271:32:32-p272:64:64-f64:32:64-f80:32-n8:16:32-S128" target datalayout = "e-m:e-p:32:32-i64:64-n32:64-S128"
target triple = "i686--linux" target triple = "wasm32--wasi"
%runtime.typecodeID = type { %runtime.typecodeID*, i32, %runtime.interfaceMethodInfo*, %runtime.typecodeID* } %runtime.typecodeID = type { %runtime.typecodeID*, i32, %runtime.interfaceMethodInfo*, %runtime.typecodeID* }
%runtime.interfaceMethodInfo = type { i8*, i32 } %runtime.interfaceMethodInfo = type { i8*, i32 }

4
compiler/testdata/pointer.ll предоставленный
Просмотреть файл

@ -1,7 +1,7 @@
; ModuleID = 'pointer.go' ; ModuleID = 'pointer.go'
source_filename = "pointer.go" source_filename = "pointer.go"
target datalayout = "e-m:e-p:32:32-p270:32:32-p271:32:32-p272:64:64-f64:32:64-f80:32-n8:16:32-S128" target datalayout = "e-m:e-p:32:32-i64:64-n32:64-S128"
target triple = "i686--linux" target triple = "wasm32--wasi"
declare noalias nonnull i8* @runtime.alloc(i32, i8*, i8*) declare noalias nonnull i8* @runtime.alloc(i32, i8*, i8*)

4
compiler/testdata/slice.ll предоставленный
Просмотреть файл

@ -1,7 +1,7 @@
; ModuleID = 'slice.go' ; ModuleID = 'slice.go'
source_filename = "slice.go" source_filename = "slice.go"
target datalayout = "e-m:e-p:32:32-p270:32:32-p271:32:32-p272:64:64-f64:32:64-f80:32-n8:16:32-S128" target datalayout = "e-m:e-p:32:32-i64:64-n32:64-S128"
target triple = "i686--linux" target triple = "wasm32--wasi"
declare noalias nonnull i8* @runtime.alloc(i32, i8*, i8*) declare noalias nonnull i8* @runtime.alloc(i32, i8*, i8*)

4
compiler/testdata/string.ll предоставленный
Просмотреть файл

@ -1,7 +1,7 @@
; ModuleID = 'string.go' ; ModuleID = 'string.go'
source_filename = "string.go" source_filename = "string.go"
target datalayout = "e-m:e-p:32:32-p270:32:32-p271:32:32-p272:64:64-f64:32:64-f80:32-n8:16:32-S128" target datalayout = "e-m:e-p:32:32-i64:64-n32:64-S128"
target triple = "i686--linux" target triple = "wasm32--wasi"
%runtime._string = type { i8*, i32 } %runtime._string = type { i8*, i32 }