[clang][CodeGen] Use memory type representation in `va_arg`
authorJan Svoboda <jan_svoboda@apple.com>
Thu, 3 Feb 2022 14:59:55 +0000 (15:59 +0100)
committerJan Svoboda <jan_svoboda@apple.com>
Fri, 4 Feb 2022 11:10:57 +0000 (12:10 +0100)
commit42afaf7f472ce8ae14f1aa3858f1a8f3abc4ac67
tree834a7a0ef6c3560cdf63f49233f45532673f57e3
parente1db505b42f4d0799640988bbdf1ab83a661a46c
[clang][CodeGen] Use memory type representation in `va_arg`

Some types (e.g. `_Bool`) have different scalar and memory representations. CodeGen for `va_arg` didn't take this into account, leading to an assertion failures with different types.

This patch makes sure we use memory representation for `va_arg`.

Reviewed By: ahatanak

Differential Revision: https://reviews.llvm.org/D118904
clang/lib/CodeGen/TargetInfo.cpp
clang/test/CodeGen/arm64-arguments.c