MS ABI: Fix __fastcall methods that return structs
authorReid Kleckner <reid@kleckner.net>
Thu, 10 Jul 2014 01:58:55 +0000 (01:58 +0000)
committerReid Kleckner <reid@kleckner.net>
Thu, 10 Jul 2014 01:58:55 +0000 (01:58 +0000)
commit677539d0afe90fe8ec6fde19d156c1e2b0d4046a
tree2dbc5817c7f73f8e8b17fb5d9b2cee1558a169c3
parent2e28edf8e1bde1c3d1971758ed9cc3730bf1d61e
MS ABI: Fix __fastcall methods that return structs

The sret paramater consumes the register after the implicit 'this'
parameter, as with other calling conventions.

Fixes PR20278, which turned out to be very easy.

llvm-svn: 212669
clang/lib/CodeGen/TargetInfo.cpp
clang/test/CodeGenCXX/microsoft-abi-cdecl-method-sret.cpp