I am trying to create a new generic function in the Swift compiler (as part
of a pass). Although I am able to create the generic function signature
fairly easily, I do not find an easy way to create a SILType from a
GenericTypeParamType, which is needed to be passed to
createFunctionArgument. Any help/suggestion?
There are two things that need to happen here, first the generic type parameter needs to be substituted with a concrete type, then it needs to be “lowered” to a SIL type.
But we would need more details to understand what you’re doing.
Slava
···
On Dec 11, 2017, at 2:30 PM, Raj Barik via swift-dev <swift-dev@swift.org> wrote:
Hi,
I am trying to create a new generic function in the Swift compiler (as part of a pass). Although I am able to create the generic function signature fairly easily, I do not find an easy way to create a SILType from a GenericTypeParamType, which is needed to be passed to createFunctionArgument. Any help/suggestion?