transform: work around renamed return type after merging LLVM modules
This fix is very similar to https://github.com/tinygo-org/tinygo/pull/1768, but now for the return type. It fixes the issue in https://github.com/tinygo-org/tinygo/issues/1887. Like #1768, I'm not sure how to test this as it is very specific to certain renames that LLVM does and that don't seem very reproducable.
Этот коммит содержится в:
родитель
15d3f5f609
коммит
f99c600ad8
1 изменённых файлов: 1 добавлений и 1 удалений
|
@ -532,7 +532,7 @@ func (p *lowerInterfacesPass) getInterfaceMethodFunc(itf *interfaceInfo, signatu
|
|||
paramTypes = append(paramTypes, param.Type())
|
||||
}
|
||||
calledFunctionType := function.Type()
|
||||
sig := llvm.PointerType(llvm.FunctionType(calledFunctionType.ElementType().ReturnType(), paramTypes, false), calledFunctionType.PointerAddressSpace())
|
||||
sig := llvm.PointerType(llvm.FunctionType(returnType, paramTypes, false), calledFunctionType.PointerAddressSpace())
|
||||
if sig != function.Type() {
|
||||
function = p.builder.CreateBitCast(function, sig, "")
|
||||
}
|
||||
|
|
Загрузка…
Создание таблицы
Сослаться в новой задаче