@@ -25,13 +25,11 @@ namespace swift {
25
25
namespace metadataimpl {
26
26
27
27
// / A common base class for opaque-existential and class-existential boxes.
28
- template <typename Impl>
29
- struct LLVM_LIBRARY_VISIBILITY ExistentialBoxBase {
30
- };
28
+ template <typename Impl> struct SWIFT_LIBRARY_VISIBILITY ExistentialBoxBase {};
31
29
32
30
// / A common base class for fixed and non-fixed opaque-existential box
33
31
// / implementations.
34
- struct LLVM_LIBRARY_VISIBILITY OpaqueExistentialBoxBase
32
+ struct SWIFT_LIBRARY_VISIBILITY OpaqueExistentialBoxBase
35
33
: ExistentialBoxBase<OpaqueExistentialBoxBase> {
36
34
template <class Container , class ... A>
37
35
static void destroy (Container *value, A... args) {
@@ -290,7 +288,7 @@ struct LLVM_LIBRARY_VISIBILITY OpaqueExistentialBoxBase
290
288
// / witness tables. Note that the WitnessTables field is accessed via
291
289
// / spooky action from Header.
292
290
template <unsigned NumWitnessTables>
293
- struct LLVM_LIBRARY_VISIBILITY FixedOpaqueExistentialContainer {
291
+ struct SWIFT_LIBRARY_VISIBILITY FixedOpaqueExistentialContainer {
294
292
OpaqueExistentialContainer Header;
295
293
const void *WitnessTables[NumWitnessTables];
296
294
};
@@ -304,7 +302,7 @@ struct FixedOpaqueExistentialContainer<0> {
304
302
// / A box implementation class for an opaque existential type with
305
303
// / a fixed number of witness tables.
306
304
template <unsigned NumWitnessTables>
307
- struct LLVM_LIBRARY_VISIBILITY OpaqueExistentialBox
305
+ struct SWIFT_LIBRARY_VISIBILITY OpaqueExistentialBox
308
306
: OpaqueExistentialBoxBase {
309
307
struct Container : FixedOpaqueExistentialContainer<NumWitnessTables> {
310
308
const Metadata *getType () const {
@@ -346,7 +344,7 @@ struct LLVM_LIBRARY_VISIBILITY OpaqueExistentialBox
346
344
347
345
// / A non-fixed box implementation class for an opaque existential
348
346
// / type with a dynamic number of witness tables.
349
- struct LLVM_LIBRARY_VISIBILITY NonFixedOpaqueExistentialBox
347
+ struct SWIFT_LIBRARY_VISIBILITY NonFixedOpaqueExistentialBox
350
348
: OpaqueExistentialBoxBase {
351
349
struct Container {
352
350
OpaqueExistentialContainer Header;
@@ -400,7 +398,7 @@ struct LLVM_LIBRARY_VISIBILITY NonFixedOpaqueExistentialBox
400
398
401
399
// / A common base class for fixed and non-fixed class-existential box
402
400
// / implementations.
403
- struct LLVM_LIBRARY_VISIBILITY ClassExistentialBoxBase
401
+ struct SWIFT_LIBRARY_VISIBILITY ClassExistentialBoxBase
404
402
: ExistentialBoxBase<ClassExistentialBoxBase> {
405
403
static constexpr unsigned numExtraInhabitants =
406
404
swift_getHeapObjectExtraInhabitantCount ();
@@ -462,14 +460,12 @@ struct LLVM_LIBRARY_VISIBILITY ClassExistentialBoxBase
462
460
return swift_getHeapObjectExtraInhabitantIndex (
463
461
(HeapObject* const *) src->getValueSlot ()) + 1 ;
464
462
}
465
-
466
463
};
467
464
468
465
// / A box implementation class for an existential container with
469
466
// / a class constraint and a fixed number of protocol witness tables.
470
467
template <unsigned NumWitnessTables>
471
- struct LLVM_LIBRARY_VISIBILITY ClassExistentialBox
472
- : ClassExistentialBoxBase {
468
+ struct SWIFT_LIBRARY_VISIBILITY ClassExistentialBox : ClassExistentialBoxBase {
473
469
struct Container {
474
470
ClassExistentialContainer Header;
475
471
const void *TypeInfo[NumWitnessTables];
@@ -495,7 +491,7 @@ struct LLVM_LIBRARY_VISIBILITY ClassExistentialBox
495
491
496
492
// / A non-fixed box implementation class for a class existential
497
493
// / type with a dynamic number of witness tables.
498
- struct LLVM_LIBRARY_VISIBILITY NonFixedClassExistentialBox
494
+ struct SWIFT_LIBRARY_VISIBILITY NonFixedClassExistentialBox
499
495
: ClassExistentialBoxBase {
500
496
struct Container {
501
497
ClassExistentialContainer Header;
@@ -532,7 +528,7 @@ struct LLVM_LIBRARY_VISIBILITY NonFixedClassExistentialBox
532
528
533
529
// / A common base class for fixed and non-fixed existential metatype box
534
530
// / implementations.
535
- struct LLVM_LIBRARY_VISIBILITY ExistentialMetatypeBoxBase
531
+ struct SWIFT_LIBRARY_VISIBILITY ExistentialMetatypeBoxBase
536
532
: ExistentialBoxBase<ExistentialMetatypeBoxBase> {
537
533
static constexpr unsigned numExtraInhabitants =
538
534
swift_getHeapObjectExtraInhabitantCount ();
@@ -591,7 +587,7 @@ struct LLVM_LIBRARY_VISIBILITY ExistentialMetatypeBoxBase
591
587
// / A box implementation class for an existential metatype container
592
588
// / with a fixed number of protocol witness tables.
593
589
template <unsigned NumWitnessTables>
594
- struct LLVM_LIBRARY_VISIBILITY ExistentialMetatypeBox
590
+ struct SWIFT_LIBRARY_VISIBILITY ExistentialMetatypeBox
595
591
: ExistentialMetatypeBoxBase {
596
592
struct Container {
597
593
ExistentialMetatypeContainer Header;
@@ -618,7 +614,7 @@ struct LLVM_LIBRARY_VISIBILITY ExistentialMetatypeBox
618
614
619
615
// / A non-fixed box implementation class for an existential metatype
620
616
// / type with a dynamic number of witness tables.
621
- struct LLVM_LIBRARY_VISIBILITY NonFixedExistentialMetatypeBox
617
+ struct SWIFT_LIBRARY_VISIBILITY NonFixedExistentialMetatypeBox
622
618
: ExistentialMetatypeBoxBase {
623
619
struct Container {
624
620
ExistentialMetatypeContainer Header;
0 commit comments