mirror of
https://github.com/tinygo-org/tinygo.git
synced 2026-08-09 13:33:39 +00:00
compiler, runtime: add layout parameter to runtime.alloc
This layout parameter is currently always nil and ignored, but will eventually contain a pointer to a memory layout. This commit also adds module verification to the transform tests, as I found out that it didn't (and therefore didn't initially catch all bugs).
This commit is contained in:
committed by
Ron Evans
parent
c454568688
commit
f24a93c51d
@@ -41,6 +41,12 @@ func testTransform(t *testing.T, pathPrefix string, transform func(mod llvm.Modu
|
||||
// Perform the transform.
|
||||
transform(mod)
|
||||
|
||||
// Check for any incorrect IR.
|
||||
err = llvm.VerifyModule(mod, llvm.PrintMessageAction)
|
||||
if err != nil {
|
||||
t.Fatal("IR verification failed")
|
||||
}
|
||||
|
||||
// Get the output from the test and filter some irrelevant lines.
|
||||
actual := mod.String()
|
||||
actual = actual[strings.Index(actual, "\ntarget datalayout = ")+1:]
|
||||
|
||||
Reference in New Issue
Block a user