compiler: add proper parameter names to runtime.initAll
This is required by the coroutines pass, otherwise it will panic. It checks for the proper parameter names to make sure the function is not exported. In this case, the runtime.initAll function wasn't exported but simply didn't have the correct parameter names so the check triggered even though it shouldn't.
Этот коммит содержится в:
родитель
888ca4ab0c
коммит
f05b378b89
1 изменённых файлов: 2 добавлений и 0 удалений
|
@ -293,6 +293,8 @@ func Compile(pkgName string, machine llvm.TargetMachine, config *compileopts.Con
|
|||
pos := c.ir.Program.Fset.Position(initFn.Pos())
|
||||
irbuilder.SetCurrentDebugLocation(uint(pos.Line), uint(pos.Column), difunc, llvm.Metadata{})
|
||||
}
|
||||
initFn.LLVMFn.Param(0).SetName("context")
|
||||
initFn.LLVMFn.Param(1).SetName("parentHandle")
|
||||
block := c.ctx.AddBasicBlock(initFn.LLVMFn, "entry")
|
||||
irbuilder.SetInsertPointAtEnd(block)
|
||||
for _, fn := range initFuncs {
|
||||
|
|
Загрузка…
Создание таблицы
Сослаться в новой задаче