compiler: do not abort on verification failure
Этот коммит содержится в:
родитель
22914165cc
коммит
60eefe1568
2 изменённых файлов: 4 добавлений и 2 удалений
|
@ -3536,7 +3536,7 @@ func (c *Compiler) IR() string {
|
|||
}
|
||||
|
||||
func (c *Compiler) Verify() error {
|
||||
return llvm.VerifyModule(c.mod, 0)
|
||||
return llvm.VerifyModule(c.mod, llvm.PrintMessageAction)
|
||||
}
|
||||
|
||||
func (c *Compiler) ApplyFunctionSections() {
|
||||
|
|
4
main.go
4
main.go
|
@ -70,7 +70,9 @@ func Compile(pkgName, outpath string, spec *TargetSpec, config *BuildConfig, act
|
|||
// stack-allocated values.
|
||||
if strings.HasPrefix(spec.Triple, "wasm") {
|
||||
c.ExternalInt64AsPtr()
|
||||
c.Verify()
|
||||
if err := c.Verify(); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
||||
// Optimization levels here are roughly the same as Clang, but probably not
|
||||
|
|
Загрузка…
Создание таблицы
Сослаться в новой задаче