Skip to content

Commit 2ed9077

Browse files
committed
Use the VWT for value ops on types with ABI-inaccessible children.
rdar://39763787
1 parent 30fa1df commit 2ed9077

18 files changed

+505
-137
lines changed

lib/IRGen/FixedTypeInfo.h

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ class FixedTypeInfo : public TypeInfo {
4545
Alignment align, IsPOD_t pod, IsBitwiseTakable_t bt,
4646
IsFixedSize_t alwaysFixedSize,
4747
SpecialTypeInfoKind stik = SpecialTypeInfoKind::Fixed)
48-
: TypeInfo(type, align, pod, bt, alwaysFixedSize, stik),
48+
: TypeInfo(type, align, pod, bt, alwaysFixedSize, IsABIAccessible, stik),
4949
SpareBits(spareBits) {
5050
assert(SpareBits.size() == size.getValueInBits());
5151
assert(isFixedSize());
@@ -58,7 +58,7 @@ class FixedTypeInfo : public TypeInfo {
5858
Alignment align, IsPOD_t pod, IsBitwiseTakable_t bt,
5959
IsFixedSize_t alwaysFixedSize,
6060
SpecialTypeInfoKind stik = SpecialTypeInfoKind::Fixed)
61-
: TypeInfo(type, align, pod, bt, alwaysFixedSize, stik),
61+
: TypeInfo(type, align, pod, bt, alwaysFixedSize, IsABIAccessible, stik),
6262
SpareBits(std::move(spareBits)) {
6363
assert(SpareBits.size() == size.getValueInBits());
6464
assert(isFixedSize());
@@ -69,6 +69,7 @@ class FixedTypeInfo : public TypeInfo {
6969
public:
7070
// This is useful for metaprogramming.
7171
static bool isFixed() { return true; }
72+
static IsABIAccessible_t isABIAccessible() { return IsABIAccessible; }
7273

7374
/// Whether this type is known to be empty.
7475
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)