MS ABI: Ensure 'this' is first for byval+sret methods
authorReid Kleckner <reid@kleckner.net>
Sat, 26 Jul 2014 00:12:26 +0000 (00:12 +0000)
committerReid Kleckner <reid@kleckner.net>
Sat, 26 Jul 2014 00:12:26 +0000 (00:12 +0000)
commit852361d2171f7b5689c5aaaccfa2583018a284e8
tree7732dbd4c9625f6f1a62eb1107a7b3d6c7e8e1fe
parent0e469609f3d829bbe95abfeb8737a4f7897c6418
MS ABI: Ensure 'this' is first for byval+sret methods

Previously we were building up the inalloca struct in the usual pattern
of return type followed by arguments.  However, on Windows, 'this'
always precedes the 'sret' parameter, so we need to insert it into the
struct first as a special case.

llvm-svn: 213990
clang/lib/CodeGen/TargetInfo.cpp
clang/test/CodeGenCXX/microsoft-abi-byval-sret.cpp