compiler: move NonConstGlobals pass to transform package

This commit is contained in:
Ayke van Laethem
2020-03-18 20:41:19 +01:00
committed by Ron Evans
parent b6314fa6ab
commit c5cb2cec9b
6 changed files with 31 additions and 12 deletions
+1 -1
View File
@@ -98,7 +98,7 @@ func Build(pkgName, outpath string, config *compileopts.Config, action func(stri
// pointers are flash and which are in RAM so that pointers can have a
// correct address space parameter (address space 1 is for flash).
if strings.HasPrefix(config.Triple(), "avr") {
c.NonConstGlobals()
transform.NonConstGlobals(c.Module())
if err := c.Verify(); err != nil {
return errors.New("verification error after making all globals non-constant on AVR")
}