compiler: move wasm ABI workaround to transform package

By considering this as a regular transformation, it can be easily
tested.
This commit is contained in:
Ayke van Laethem
2019-12-07 23:01:20 +01:00
committed by Ron Evans
parent 91299b6466
commit 4d79d473c4
6 changed files with 248 additions and 133 deletions
+18
View File
@@ -0,0 +1,18 @@
package transform
import (
"testing"
"tinygo.org/x/go-llvm"
)
func TestWasmABI(t *testing.T) {
t.Parallel()
testTransform(t, "testdata/wasm-abi", func(mod llvm.Module) {
// Run ABI change pass.
err := ExternalInt64AsPtr(mod)
if err != nil {
t.Errorf("failed to change wasm ABI: %v", err)
}
})
}