[swift-dev] IRGen variadic function declaration

John McCall rjmccall at apple.com
Tue Apr 11 16:46:26 CDT 2017


> On Apr 11, 2017, at 5:33 PM, Slava Pestov via swift-dev <swift-dev at swift.org> 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 wrappers as static inline functions in a header file there won’t be any runtime overhead.

If this is a real LLVM IR intrinsic, it's probably better hack the compiler to add a Builtin function.  But, as always, What Are You Trying To Do?

John.


> 
> Slava
> 
>> On Apr 11, 2017, at 2:27 PM, Richard Wei via swift-dev <swift-dev at swift.org> wrote:
>> 
>> 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
>> _______________________________________________
>> swift-dev mailing list
>> swift-dev at swift.org
>> https://lists.swift.org/mailman/listinfo/swift-dev
> 
> _______________________________________________
> swift-dev mailing list
> swift-dev at swift.org
> https://lists.swift.org/mailman/listinfo/swift-dev



More information about the swift-dev mailing list