Dmitri Gribenko
762720e4c7
Merge pull request #31400 from hlopko/pretty-print-static-vars-in-sil
...
[CxxInterop] Add C++ demangled name for globals/static member variables to SIL
2020-05-01 00:14:17 +02:00
Dmitri Gribenko
105c8f96b1
Merge pull request #31441 from hlopko/header-guards
...
Add header guards to headers in test/interop
2020-04-30 20:51:07 +02:00
Marcel Hlopko
45509cd885
Add // clang name: Foo::bar comment to globals/functions/static member variables
2020-04-30 16:55:14 +02:00
Marcel Hlopko
2fbcf184ed
Add header guards to test/Interop
2020-04-30 16:13:33 +02:00
Marcel Hlopko
6c9ccbc59b
Add header guards for test input headers
2020-04-30 15:49:20 +02:00
Marcel Hlopko
edbd902a90
Change C++ extension for test inputs from .cc to .cpp
2020-04-30 15:34:16 +02:00
Dmitri Gribenko
fb7020f3f7
Merge pull request #31396 from hlopko/static-member-func
...
Test static member functions
2020-04-30 12:21:56 +02:00
Marcel Hlopko
cf62838aad
Test static member functions
2020-04-29 15:37:15 +02:00
Marcel Hlopko
6e50c91b37
[CxxInterop] Add tests for static vars
...
[SR-12464](https://bugs.swift.org/browse/SR-12464 )
2020-04-29 10:19:37 +02:00
Dmitri Gribenko
bc55dbadc7
Merge pull request #31070 from hlopko/statics-tests
...
[CxxInterop] Expose C++ static members as Swift static properties
2020-04-23 18:29:44 +02:00
Marcel Hlopko
883262771b
Expose C++ static members as Swift static properties
2020-04-23 15:33:43 +02:00
Dmitri Gribenko
e37e475a0d
Merge pull request #31035 from martinboehme/emit-called-func
...
Bug fix: Emit code for C++ inline function called from another inline function
2020-04-22 13:05:36 +02:00
Marcel Hlopko
95a59d9dd5
Make irgen tests mac friendly
2020-04-21 16:57:04 +02:00
Marcel Hlopko
8af9ca08c1
Make irgen test windows friendly
2020-04-21 16:48:24 +02:00
Marcel Hlopko
937b1e2ba2
Trust -fPIE will come from target_clang
2020-04-21 14:06:54 +02:00
Marcel Hlopko
cfe463d715
Cleanup
2020-04-20 16:27:27 +02:00
Marcel Hlopko
cd1560a487
Address comments
2020-04-20 16:25:04 +02:00
Martin Boehme
f2bfa262b4
Fix "CXX-DAG" lines mistakenly renamed to "CXX-DOG" for testing.
2020-04-20 15:12:18 +02:00
Martin Boehme
78688925f5
Make tests pass under Darwin and Windows.
2020-04-20 14:06:13 +02:00
Marcel Hlopko
774b655b39
Reverse args to expectEqual
2020-04-20 10:57:39 +02:00
Marcel Hlopko
8136d8c006
Rename test suite var
2020-04-20 10:46:34 +02:00
Marcel Hlopko
6321392e09
Interleave code and checks
2020-04-20 10:00:38 +02:00
Marcel Hlopko
fdcb330284
Add inout tests, add labels
2020-04-20 09:56:51 +02:00
Marcel Hlopko
f4d897e09e
Remove uninspired comment
2020-04-17 16:44:30 +02:00
Marcel Hlopko
ee775e68ff
Add more tests
2020-04-17 16:42:37 +02:00
Marcel Hlopko
aba7326d32
Update test/Interop/Cxx/extern-var/extern-var-irgen.swift
...
Co-Authored-By: Dmitri Gribenko <gribozavr@gmail.com >
2020-04-17 15:43:23 +02:00
Marcel Hlopko
d68ce6e6a0
Comment out failing tests
2020-04-17 15:35:25 +02:00
Marcel Hlopko
8ef3494340
Rename global-var -> extern-var
2020-04-17 14:58:47 +02:00
Marcel Hlopko
c590d72c12
Steal files from other branch
2020-04-17 14:54:10 +02:00
Martin Boehme
d98f8d3a3d
Also emit inline functions that are used in variable initializers.
2020-04-17 12:53:06 +02:00
Martin Boehme
e9ca0c74dc
Responses to review comments by @gribozavr.
2020-04-16 19:26:18 +02:00
Martin Boehme
35f8ef50f8
More reponses to review comments by @gribozavr.
...
One larger change is that we're now also running this test in C as well
as C++.
2020-04-15 14:44:31 +02:00
Martin Boehme
e31c7bc973
Respond to review comments by @gribozavr.
2020-04-15 10:43:18 +02:00
Martin Boehme
9e1fe0cfc7
Rename EmitCalledFunction.h to emit-called-function.h.
2020-04-15 09:43:19 +02:00
Martin Boehme
839c4e05ad
Bug fix: Emit code for C++ inline function called from another inline function.
...
Adds a test that fails without the fix.
The fix consists simply of removing a return statement; as a result, we
now always emit code for functions referenced from the function we are
currently emitting.
Previously, this was not done for externally visible functions. This
goes all the way back to when `GenClangDecl.cpp` was originally introduced here:
ee22004b84
I speculate that the reason for doing this was that in C and Objective-C, we
can assume that an externally visible function will be provided by some
`.o` file we're linking against (though I'm not sure if this is in fact
true for C99 inline functions). At any rate, this assumption is no longer true
for C++ inline functions.
2020-04-15 09:18:22 +02:00
Michael Forster
f609a7cbb4
Unify layout for C++ interop tests
...
This was discussed here:
https://forums.swift.org/t/reorganize-swift-compiler-tests-for-c-objc-c-interop/34411
Resolves: [SR-12475](https://bugs.swift.org/browse/SR-12475 )
2020-04-06 09:38:18 +02:00
Michael Forster
98bbb81f82
[C++] Make const member variables read-only
...
This imports const members of C++ structs/classes stored properties with
an inaccessible setter.
Note that in C++ there are ways to change the values of const members,
so we don't use `WriteImplKind::Immutable` storage.
Resolves: [SR-12463](https://bugs.swift.org/browse/SR-12463 )
2020-04-03 13:15:33 +02:00