Skip to content

Commit 5bde0c9

Browse files
committed
[Runtime] Use Runtime types for size/stride in TargetValueWitnessTypes.
We want to use Runtime::StoredSize so the layout is correct when using an external Runtime template. size_t is correct in-process but may not be correct out of process.
1 parent 647657c commit 5bde0c9

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

include/swift/ABI/ValueWitnessTable.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -119,8 +119,8 @@ class TargetValueWitnessTypes {
119119

120120
// Handle the data witnesses explicitly so we can use more specific
121121
// types for the flags enums.
122-
typedef size_t size;
123-
typedef size_t stride;
122+
typedef typename Runtime::StoredSize size;
123+
typedef typename Runtime::StoredSize stride;
124124
typedef TargetValueWitnessFlags<typename Runtime::StoredSize> flags;
125125
typedef uint32_t extraInhabitantCount;
126126
};

0 commit comments

Comments
 (0)