Skip to content

Commit 03677f5

Browse files
committed
Use the VWT for value ops on types with ABI-inaccessible children.
rdar://39763787
1 parent 0691490 commit 03677f5

18 files changed

+502
-136
lines changed

lib/IRGen/FixedTypeInfo.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,7 @@ class FixedTypeInfo : public TypeInfo {
5050
Alignment align, IsPOD_t pod, IsBitwiseTakable_t bt,
5151
IsFixedSize_t alwaysFixedSize,
5252
SpecialTypeInfoKind stik = STIK_Fixed)
53-
: TypeInfo(type, align, pod, bt, alwaysFixedSize, stik),
54-
StorageSize(size), SpareBits(spareBits) {
53+
: TypeInfo(type, align, pod, bt, alwaysFixedSize, IsABIAccessible, stik), StorageSize(size), SpareBits(spareBits) {
5554
assert(SpareBits.size() == size.getValueInBits());
5655
assert(isFixedSize());
5756
}
@@ -61,7 +60,7 @@ class FixedTypeInfo : public TypeInfo {
6160
Alignment align, IsPOD_t pod, IsBitwiseTakable_t bt,
6261
IsFixedSize_t alwaysFixedSize,
6362
SpecialTypeInfoKind stik = STIK_Fixed)
64-
: TypeInfo(type, align, pod, bt, alwaysFixedSize, stik),
63+
: TypeInfo(type, align, pod, bt, alwaysFixedSize, IsABIAccessible, stik),
6564
StorageSize(size), SpareBits(std::move(spareBits)) {
6665
assert(SpareBits.size() == size.getValueInBits());
6766
assert(isFixedSize());
@@ -70,6 +69,7 @@ class FixedTypeInfo : public TypeInfo {
7069
public:
7170
// This is useful for metaprogramming.
7271
static bool isFixed() { return true; }
72+
static IsABIAccessible_t isABIAccessible() { return IsABIAccessible; }
7373

7474
/// Whether this type is known to be empty.
7575
bool isKnownEmpty(ResilienceExpansion expansion) const {

lib/IRGen/GenArchetype.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,8 @@ namespace {
8989
class OpaqueArchetypeTypeInfo
9090
: public ResilientTypeInfo<OpaqueArchetypeTypeInfo>
9191
{
92-
OpaqueArchetypeTypeInfo(llvm::Type *type) : ResilientTypeInfo(type) {}
92+
OpaqueArchetypeTypeInfo(llvm::Type *type)
93+
: ResilientTypeInfo(type, IsABIAccessible) {}
9394

9495
public:
9596
static const OpaqueArchetypeTypeInfo *create(llvm::Type *type) {

0 commit comments

Comments
 (0)