summaryrefslogtreecommitdiffstats
path: root/clang/test/CodeGenCXX/trivial_abi.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Revert "[Sema] Make canPassInRegisters return true if the CXXRecordDecl passed"Akira Hatanaka2019-02-011-17/+2
| | | | | | | | | | | This reverts commit r350920 as it is not clear whether we should force a class to be returned in registers when copy and move constructors are both deleted. For more background, see the following discussion: http://lists.llvm.org/pipermail/cfe-commits/Week-of-Mon-20190128/259907.html llvm-svn: 352822
* [Sema] Make canPassInRegisters return true if the CXXRecordDecl passedAkira Hatanaka2019-01-111-2/+17
| | | | | | | | | | | | to it is a trivial_abi class. A class that has all of its copy and move constructors deleted can still be passed or returned in registers if the class is annotated with trivial_abi. This fixes PR39683. llvm-svn: 350920
* Revert "[CodeGenCXX] Treat 'this' as noalias in constructors"Sean Fertile2018-10-151-11/+11
| | | | | | | This reverts commit https://reviews.llvm.org/rL344150 which causes MachineOutliner related failures on the ppc64le multistage buildbot. llvm-svn: 344526
* [CodeGenCXX] Treat 'this' as noalias in constructorsAnton Bikineev2018-10-101-11/+11
| | | | | | | | | This is currently a clang extension and a resolution of the defect report in the C++ Standard. Differential Revision: https://reviews.llvm.org/D46441 llvm-svn: 344150
* Add support for attribute 'trivial_abi'.Akira Hatanaka2018-02-051-0/+239
The 'trivial_abi' attribute can be applied to a C++ class, struct, or union. It makes special functions of the annotated class (the destructor and copy/move constructors) to be trivial for the purpose of calls and, as a result, enables the annotated class or containing classes to be passed or returned using the C ABI for the underlying type. When a type that is considered trivial for the purpose of calls despite having a non-trivial destructor (which happens only when the class type or one of its subobjects is a 'trivial_abi' class) is passed to a function, the callee is responsible for destroying the object. For more background, see the discussions that took place on the mailing list: http://lists.llvm.org/pipermail/cfe-dev/2017-November/055955.html http://lists.llvm.org/pipermail/cfe-commits/Week-of-Mon-20180101/thread.html#214043 rdar://problem/35204524 Differential Revision: https://reviews.llvm.org/D41039 llvm-svn: 324269
OpenPOWER on IntegriCloud