Re: [swift-dev] IRGen variadic function declaration

2017-04-11 Thread Richard Wei via swift-dev
Thanks for the help. It's a target-dependent intrinsic for a custom LLVM pass. Probably not worth hacking the Swift compiler for now. A downside is that I have to wrap the intrinsic in a header for different numbers of arguments and different arg types. -Richard On Apr 11, 2017, at 16:46, Jo

Re: [swift-dev] IRGen variadic function declaration

2017-04-11 Thread John McCall via swift-dev
> On Apr 11, 2017, at 5:33 PM, Slava Pestov via swift-dev > wrote: > Please don’t use @_silgen_name. Soon it will only be available within the > standard library. > > Instead, write C wrappers around your intrinsics and create a Clang module > that you can import from Swift. If you define the

Re: [swift-dev] IRGen variadic function declaration

2017-04-11 Thread Slava Pestov via swift-dev
Please don’t use @_silgen_name. Soon it will only be available within the standard library. Instead, write C wrappers around your intrinsics and create a Clang module that you can import from Swift. If you define the wrappers as static inline functions in a header file there won’t be any runtim

[swift-dev] IRGen variadic function declaration

2017-04-11 Thread Richard Wei via swift-dev
Hello, I’m trying to declare (using _silgen_name) a Swift function that maps onto an IR intrinsic with argument (i32, …). Is there a way to emit the exact variadic function from Swift? -Richard signature.asc Description: Message signed with OpenPGP