Commit Graph

14 Commits

Author SHA1 Message Date
Ben Langmuir
cda65d1304 [test] Fix test/IRGen/metadata.swift to match the correct symbol
When this test was updated for new platforms it was accidentally changed
to match the _METACLASS_DATA symbol instead of the _DATA symbol. Fix
that and update the flags to match. This lets us remove the instance
start value 40 from the checks, so the test now matches the comment
saying it should be 8 or 16.

rdar://135453916
2024-09-11 11:09:11 -07:00
Ben Langmuir
3b1571ee67 [test] Update IRGen/metadata.swift to pass on later tvOS
This test has been failing on arm64-tvos-simulator forever, and after we
bumped the default deployment target is also failing on x86_64. Update
the test to match ios/watchos, which were already fixed in the past.

rdar://135453916
2024-09-09 13:28:20 -07:00
Arnold Schwaighofer
3b5ebaa46c Fix some tests in IRGen folder 2023-06-21 10:10:32 -07:00
Arnold Schwaighofer
c1a93e0bde Move tests over to use the %use_no_opaque_pointers option 2023-06-14 10:49:48 -07:00
Mishal Shah
b5a01ba5e0 Support for x86_64 watchOS simulator
* Start testing watchOS simulator x86_64 and i386 by default

Users will require to install watchOS 6.2 or older simulator to support i386.

1. Install watchOS 6.2 or older simulator (Xcode -> Preferences -> Components -> Simulators).
2. Create a 32-bit watchOS device.
3. Run:
`xcrun simctl create 'Apple Watch Series 2 - 42mm' com.apple.CoreSimulator.SimDeviceType.Apple-Watch-Series-2-42mm com.apple.CoreSimulator.SimRuntime.watchOS-6-2`
2021-04-22 20:06:17 -07:00
Joe Groff
445bde5127 IRGen: Give ObjC metadata symbols internal linkage.
This preserves the symbol names in (unstripped) binaries, so we can use them for link ordering and
memory usage analysis.
2020-07-29 13:49:25 -07:00
Mishal Shah
efe5907e0b [Apple Silicon] [Test] Fix various IRGen tests for arm64 macOS 2020-07-02 17:56:54 -07:00
Kuba (Brecka) Mracek
c728d7a4d2 Fix failing IRGen arm64e tests (#30296) 2020-03-10 11:22:54 -07:00
Erik Eckstein
1b312a85bd Merge remote-tracking branch 'origin/master' into master-rebranch 2020-01-16 10:39:20 +01:00
Arnold Schwaighofer
32a5bf0835 Fix test for linux 2020-01-15 07:49:38 -08:00
Arnold Schwaighofer
7f20d937e9 IRGen: Correctly compute instanceStart for a Swift class that starts with an empty field and is followed by a resilient field
We used to crash for classes that have an empty and a resilient field
during intialization if the object was in the shared cache.

  class CrashInInit {
    var empty = EmptyStruct()
    var resilient = ResilientThing()
  }

What happened was that for such a class we we would compute a
instanceStart of 0. The shared cache builder would then slide the value
of the constant ivar offset for the empty field from 0 to 16. However,
the field offset for empty fields is assumed to be zero and the runtime
does not compute a different value for the empty field and so the field
offset for the empty field remains 0. The runtime then trys to reconcile
the field offset (0) and the ivar offset (16) trying to write to the ivar
offset. However, the ivar offset is marked as constant and so we
crashed.
This can be avoided by correctly computing the instanceStart for such a
class to be 16 such that the shared cache builder does not update the
value of the empty field.

rdar://rdar://58458169
2020-01-15 06:18:41 -08:00
Arnold Schwaighofer
9ee12db2a9 Fix tests for LLVM change that added anonymous parameter labeling
Fix for r367755.
2019-08-15 14:57:24 -07:00
Arnold Schwaighofer
8e0189181e IRGen: Fix handling of singleton aggregate projections and tuple types
Follow up to "IRGen: getSingletonAggregateFieldType must not return field if
its access level does not match"

rdar://50554717
2019-06-05 08:18:02 -07:00
Arnold Schwaighofer
12b27a1332 IRGen: getSingletonAggregateFieldType must not return field if its access level does not match
rdar://50554717
2019-06-03 06:56:43 -07:00