@@ -1605,10 +1605,6 @@ namespace {
1605
1605
};
1606
1606
1607
1607
// / Lower address only types as opaque values.
1608
- // /
1609
- // / Opaque values behave like loadable leaf types in SIL.
1610
- // /
1611
- // / FIXME: When you remove an unreachable, just delete the method.
1612
1608
class OpaqueValueTypeLowering : public LeafLoadableTypeLowering {
1613
1609
public:
1614
1610
OpaqueValueTypeLowering (SILType type, RecursiveProperties properties,
@@ -1622,6 +1618,20 @@ namespace {
1622
1618
llvm_unreachable (" copy into" );
1623
1619
}
1624
1620
1621
+ // OpaqueValue store cannot be decoupled from a destroy because it is not
1622
+ // bitwise-movable.
1623
+ void emitStore (SILBuilder &B, SILLocation loc, SILValue value,
1624
+ SILValue addr, StoreOwnershipQualifier qual) const override {
1625
+ B.createStore (loc, value, addr, qual);
1626
+ }
1627
+
1628
+ // OpaqueValue load cannot be decoupled from a copy because it is not
1629
+ // bitwise-movable.
1630
+ SILValue emitLoad (SILBuilder &B, SILLocation loc, SILValue addr,
1631
+ LoadOwnershipQualifier qual) const override {
1632
+ return B.createLoad (loc, addr, qual);
1633
+ }
1634
+
1625
1635
// --- Same as LeafLoadableTypeLowering.
1626
1636
1627
1637
SILValue emitLoweredCopyValue (SILBuilder &B, SILLocation loc,
0 commit comments