fix bugs found by LLVM assertions

This commit is contained in:
Jaden Weiss
2019-09-12 16:33:14 -04:00
committed by Ayke
parent e0ebc75df2
commit abca3132a9
12 changed files with 163 additions and 24 deletions
+5
View File
@@ -23,6 +23,11 @@ func (c *Compiler) Optimize(optLevel, sizeLevel int, inlinerThreshold uint) erro
c.replacePanicsWithTrap() // -panic=trap
}
// run a check of all of our code
if c.VerifyIR {
c.checkModule()
}
// Run function passes for each function.
funcPasses := llvm.NewFunctionPassManagerForModule(c.mod)
defer funcPasses.Dispose()