This is an archive of the discontinued LLVM Phabricator instance.

Sema, CodeGen: Ensure that an implicit copy ctor is always available under the Microsoft C++ ABI.
ClosedPublic

Authored by pcc on Nov 17 2016, 5:18 PM.

Details

Summary

This is needed because whether the constructor is deleted can control whether
we pass structs by value directly.

To fix this properly we probably want a more direct way for CodeGen to ask
whether the constructor was deleted.

Fixes PR31049.

Diff Detail

Repository
rL LLVM

Event Timeline

pcc updated this revision to Diff 78440.Nov 17 2016, 5:18 PM
pcc retitled this revision from to Sema, CodeGen: Ensure that an implicit copy ctor is always available under the Microsoft C++ ABI..
pcc updated this object.
pcc added a reviewer: rnk.
pcc added a subscriber: llvm-commits.
rnk added a reviewer: rsmith.Nov 18 2016, 10:10 AM
rnk edited edge metadata.

RIchard, thoughts on which quick fix is better? Forcing the implicit decls or only handling the 'definition_only' case by looking for nontrivial move ctors in MicrosoftCXXABI?

pcc updated this revision to Diff 78595.Nov 18 2016, 3:53 PM
pcc edited edge metadata.

New approach

rnk accepted this revision.Nov 21 2016, 2:54 PM
rnk edited edge metadata.

lgtm This seems like a reasonable fix for now. Thanks for going through all that!

This revision is now accepted and ready to land.Nov 21 2016, 2:54 PM
This revision was automatically updated to reflect the committed changes.