[PATCH] D60349: [COFF, ARM64] Fix ABI implementation of struct returns

Eli Friedman via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Apr 25 17:09:09 PDT 2019

efriedma added a comment.

> Could you provide some more details on why NotPod is HFA, according to AAPCS?

In general, computing whether a composite type is a "homogeneous aggregate" according to section 4.3.5 depends only on the "fundamental data types".  It looks through "aggregates" (C structs/C++ classes), unions, and arrays.  The test applies "without regard to access control or other source language restrictions".  Section 7.1.6 mentions there are additional rules that apply to non-POD structs, but that's just referring to the Itanium C++ ABI rule that types which are "non-trivial for the purposes of calls" are passed and returned indirectly.  Both clang and gcc agree that "NotPod" is an HFA on AArch64 Linux.

So the question is, what rule is MSVC using to exclude "NotPod" from being an HFA?



More information about the cfe-commits mailing list