slang
slang copied to clipboard
[SPIR-V] Fix error of extern function signature
As for extern function, it's not definition, that is no params. After legalize, the function type hasn't params, it's a error signature.
When we fix the function type, extern function should check the param types in function type instead of params.
It based on PR #7447. SPIR-V validation:
error: line 28: Function declaration (id 7) must have a LinkageAttributes decoration with the Import Linkage type.
%f = OpFunction %int None %8
Close this PR and then merge into #7447.