Commit Graph

9 Commits

Author SHA1 Message Date
Becca Royal-Gordon
fd84e7273d Rename module.map -> module.modulemap in tests
The legacy `module.map` spelling of module map files was deprecated by llvm/llvm-project#75142 and clang expects to remove support for them in the future. Switch all tests to use the supported spelling.

Fixes rdar://128431478.
2024-08-12 17:47:26 -07:00
Nate Chandler
08bf645ef7 [Test] Check multipayload empty case wrapping.
Verify the behavior of swift_storeEnumTagMultiPayload in the face of
small payload sizes (8 bits) and many empty cases (more than 2^8).

Additional test of the behavior that was fixed at
https://github.com/apple/swift/pull/42131
2022-04-01 08:30:35 -07:00
Nate Chandler
f12a321045 [Runtime] Fixed multi-payload empty-case masking.
When storing a tag into a multi-payload enum for an empty case via
swift_storeEnumTagMultiPayload, the tag is split between the storage for
payloads (i.e. the associated values of the non-empty cases) and the
storage for tags (i.e. the integers which refer to the non-empty cases).

Typically, the number of non-empty cases (i.e. one beyond the tag
that refers to the last non-empty case) is stored into the tag storage
and the integer which distinguishes which among the empty cases the enum
is in is stored into storage for payloads.  When the enum is small,
however--specifically, when the payload size is less than four
bytes--that information is packaged differently via masking.

Previously, there was a problem with that masking.  While the value
stored into the tag storage was correct (and correctly indicated that
the enum was in some empty case), the value stored into the payload
storage was not.  The result was that which empty case an enum was in
would be corrupted.

Here, that is fixed by fixing the masking.

rdar://87914343
2022-03-31 21:09:36 -07:00
Slava Pestov
52fbe642ed Fix REQUIRES lines on class stubs tests
We use the just-built clang without any -target or -sdk flags. Keep things
simple and limit the test to macOS for now.

Fixes <rdar://problem/50586614>.
2019-05-08 22:22:27 -04:00
Nathan Hawes
af3fbc52b3 Revert "Add tests for weak-linked class stubs" 2019-05-08 10:55:00 -07:00
Slava Pestov
9f4b86b741 Add test for weak-linked Objective-C resilient class stubs 2019-05-07 16:34:56 -04:00
Slava Pestov
9536eff2d6 Execution tests for Objective-C resilient class stubs
Fixes <rdar://49090613>, except they're disabled for the time being.
2019-04-19 17:39:51 -04:00
Slava Pestov
32954fc463 Use -read-legacy-type-info-path in Runtime/class-layout-from-objc.m test 2019-02-08 14:22:00 -05:00
Jordan Rose
7629253ab5 Test that newer libobjcs let the Swift runtime set up a class's layout (#21942)
Specifically, when the class is referenced from Objective-C first,
before being referenced from Swift in any way. This is important for
resilience, since up until now Objective-C isn't used to the size of a
class changing based on anything other than a superclass's size
changing.

This is basically the test that would have gone with 9024768b0 had
there been a build of libobjc to test it with.

rdar://problem/45718008
2019-01-17 17:39:44 -08:00