Commit Graph

6 Commits

Author SHA1 Message Date
John McCall 4448880e18 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++.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@328942 91177308-0d34-0410-b5e6-96231b3b80d8
2018-04-01 21:04:30 +00:00
Paul Robinson bfe473e654 Make another test insensitive to the default C++ dialect.
Differential Revision: http://reviews.llvm.org/D27955


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@290145 91177308-0d34-0410-b5e6-96231b3b80d8
2016-12-19 23:32:10 +00:00
Paul Robinson 79bc529609 Undo accidental comit
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@290121 91177308-0d34-0410-b5e6-96231b3b80d8
2016-12-19 18:00:45 +00:00
Paul Robinson 41deb1fc6b Make a few OpenMP tests "C++11 clean."
Reviewed by abataev (in D27794)



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@290120 91177308-0d34-0410-b5e6-96231b3b80d8
2016-12-19 17:58:09 +00:00
Manman Ren 04f331168c Update testing cases after backend changes.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@265488 91177308-0d34-0410-b5e6-96231b3b80d8
2016-04-05 23:27:51 +00:00
John McCall df563ecc01 IRGen-level lowering for the Swift calling convention.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@265324 91177308-0d34-0410-b5e6-96231b3b80d8
2016-04-04 18:33:08 +00:00