This patch adds an attribute inline_va_arg_pack which applies to calls/invokes and is the result of lowering __builtin_va_arg_pack(), as well as the intrinsic @llvm.va_arg_pack_len, which is the result of lowering __builtin_va_arg_pack_len(). These can only appear in available_externally functions, and are themselves lowered during inlining. You can read more about them here: https://gcc.gnu.org/onlinedocs/gcc-4.4.2/gcc/Constructing-Calls.html, I explained the motivation for them on the clang patch.
Fixes llvm.org/PR7219 & rdar://11102669
Thanks for taking a look!