Skip to content

Add support for calling C++ constructors #30630

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 33 commits into from
Oct 20, 2020
Merged
Changes from 1 commit
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
a5e953b
Add support for calling C++ constructors.
martinboehme Feb 26, 2020
7ad2eef
Only import constructors marked `noexcept`.
martinboehme Mar 26, 2020
3848548
Revert "Only import constructors marked `noexcept`."
martinboehme Apr 7, 2020
fd00bc1
Move tests from `CXXInterop` to `Interop/Cxx`.
martinboehme May 13, 2020
e606727
Duplicate changes to GenClangType in ClangTypeConverter.
martinboehme May 14, 2020
b2c5a3e
Add a constructor thunk if required to add additional constructor
martinboehme May 11, 2020
3066e16
Remove redundant "cxx" from test names.
martinboehme May 15, 2020
5644137
Eliminate duplication of code for adding empty argument names.
martinboehme May 15, 2020
bed2603
Various changes after merging master:
martinboehme May 20, 2020
beaaa74
Don't put an `sret` attribute on the `this` argument.
martinboehme May 25, 2020
8416ccf
Rename constructors-ir.swift to constructors-irgen.swift.
martinboehme May 25, 2020
8f6042a
Add additional IR tests for a class without a virtual base class.
martinboehme May 25, 2020
c9405fb
Add Windows-name-mangled version of symbol to SIL test.
martinboehme May 26, 2020
cb4ddda
Avoid crashing if lldb imports C++ structs without enabling C++ interop.
martinboehme Jun 2, 2020
33e8c71
Update comment in VisitCXXRecordDecl().
martinboehme Jun 8, 2020
7e8ea12
Respond to review comments.
martinboehme Jun 10, 2020
1ce3753
Another response to review comments.
martinboehme Jun 10, 2020
faca489
Add a test that Objective-C types passed to a C++ constructor are
martinboehme Jun 10, 2020
83b51b9
Add SILGen and IRGen tests for passing Objective-C types to C++
martinboehme Jun 10, 2020
cc7564e
Rename constructors-sil.swift to constructors-silgen.swift.
martinboehme Jun 10, 2020
2713edb
[cxx-interop] Fix missing APIs and tests after rebase.
zoecarver Sep 21, 2020
7399c20
[cxx-interop] Revert changes to ClangTypeConverter::visitMetatypeType.
zoecarver Sep 24, 2020
9e2d03e
[cxx-interop] Skip void types in emitCXXConstructorThunkIfNeeded.
zoecarver Sep 29, 2020
7635443
[cxx-interop] Update ABIArgInfo::Indirect case in expandExternalSigna…
zoecarver Oct 3, 2020
f04de9f
[cxx-interop] Skip metatypes when lowering C++ constructor SIL functi…
zoecarver Oct 4, 2020
4364af3
[cxx-interop] Small fixes and cleanup based on review.
zoecarver Oct 4, 2020
5774610
[cxx-interop] Fix patch formatting with clang-format.
zoecarver Oct 4, 2020
4cb337a
[cxx-interop] Generate memberwise initializers for non-C++ types.
zoecarver Oct 10, 2020
20222bb
[cxx-interop] Bail if trying to convert call result to void.
zoecarver Oct 10, 2020
b2bb47d
[cxx-interop] Fix Windows tests for non-trivial C++ types.
zoecarver Oct 10, 2020
1d3b051
[cxx-interop] Remove logic around applying attributes.
zoecarver Oct 13, 2020
d9acaf3
[cxx-interop] Merge synthesized initializer tests into "constructors-…
zoecarver Oct 15, 2020
545b44e
[cxx-interop] Look through template decl to find constructor when imp…
zoecarver Oct 16, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Another response to review comments.
  • Loading branch information
martinboehme authored and zoecarver committed Oct 9, 2020
commit 1ce3753d08522cefe255f4acf498dba5085aa60a
2 changes: 2 additions & 0 deletions lib/IRGen/GenCall.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1318,6 +1318,8 @@ void SignatureExpansion::expandExternalSignatureTypes() {
// Convert each parameter to a Clang type.
for (auto param : params) {
auto clangTy = IGM.getClangType(param, FnType);
// If a parameter type is lowered to void, this means it should be ignored.
// For example, this happens for thin metatypes.
if (clangTy->isVoidType()) {
continue;
}
Expand Down