Use the generic type lowering algorithm described in
"docs/CallingConvention.rst#physical-lowering" to map from IRGen's explosion
type to the type expected by the ABI.
Change IRGen to use the swift calling convention (swiftcc) for native swift
functions.
Use the 'swiftself' attribute on self parameters and for closures contexts.
Use the 'swifterror' parameter for swift error parameters.
Change functions in the runtime that are called as native swift functions to use
the swift calling convention.
rdar://19978563
Swift uses rt_swift_* functions to call the Swift runtime without using dyld's stubs. These functions are renamed to swift_rt_* to reduce namespace pollution.
rdar://28706212
Fix a mistake introduced by 1409a445, which moved us to the new
setUnnamedAddr API introduced by llvm/r272709.
rt_swift_release is linkonce_odr, so each module gets an identical copy
of it and its address doesn't matter. Set the local_unnamed_addr
attribute on it.
Thanks to Saleem Abdulrasool for the catch!
Removing the duplicate function and adding -parse-as-library makes
the order of definitions not depend on whether the standard library
was built with -sil-serialize-all or not.