Commit Graph

6 Commits

Author SHA1 Message Date
John McCall 4fcd9ef673 Fix a major swiftcall ABI bug with trivial C++ class types.
The problem with the previous logic was that there might not be any
explicit copy/move constructor declarations, e.g. if the type is
trivial and we've never type-checked a copy of it.  Relying on Sema's
computation seems much more reliable.

Also, I believe Richard's recommendation is exactly the rule we use
now on the Itanium ABI, modulo the trivial_abi attribute (which this
change of course fixes our handling of in Swift).

This does mean that we have a less portable rule for deciding
indirectness for swiftcall.  I would prefer it if we just applied the
Itanium rule universally under swiftcall, but in the meantime, I need
to fix this bug.

This only arises when defining functions with class-type arguments
in C++, as we do in the Swift runtime.  It doesn't affect normal Swift
operation because we don't import code as C++.

llvm-svn: 328942
2018-04-01 21:04:30 +00:00
Paul Robinson ebfc2f90d0 Make another test insensitive to the default C++ dialect.
Differential Revision: http://reviews.llvm.org/D27955

llvm-svn: 290145
2016-12-19 23:32:10 +00:00
Paul Robinson 086c90b24a Undo accidental comit
llvm-svn: 290121
2016-12-19 18:00:45 +00:00
Paul Robinson 514e743b06 Make a few OpenMP tests "C++11 clean."
Reviewed by abataev (in D27794)

llvm-svn: 290120
2016-12-19 17:58:09 +00:00
Manman Ren 29be7e10ca Update testing cases after backend changes.
llvm-svn: 265488
2016-04-05 23:27:51 +00:00
John McCall 12f2352152 IRGen-level lowering for the Swift calling convention.
llvm-svn: 265324
2016-04-04 18:33:08 +00:00