mirror of
https://github.com/tinygo-org/tinygo.git
synced 2026-08-04 11:07:46 +00:00
Print IR before optimization
This makes invalid IR easier to spot (see previous commit).
This commit is contained in:
@@ -424,6 +424,10 @@ func Compile(inpath, outpath, target string, printIR bool) error {
|
||||
return err
|
||||
}
|
||||
|
||||
if printIR {
|
||||
fmt.Println(c.IR())
|
||||
}
|
||||
|
||||
if err := c.Verify(); err != nil {
|
||||
return err
|
||||
}
|
||||
@@ -432,10 +436,6 @@ func Compile(inpath, outpath, target string, printIR bool) error {
|
||||
return err
|
||||
}
|
||||
|
||||
if printIR {
|
||||
fmt.Println(c.IR())
|
||||
}
|
||||
|
||||
err = c.EmitObject(outpath)
|
||||
if err != nil {
|
||||
return err
|
||||
|
||||
Reference in New Issue
Block a user