mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
Restore CanType-based micro-optimizations.
This reverts commit 5036806e5a.
However, it preserves a pair of changes to the SIL optimizer
relating to walking through optional types.
This commit is contained in:
@@ -1620,7 +1620,7 @@ emitEnumElementDispatch(ArrayRef<RowToSpecialize> rows,
|
||||
// If the enum is @_fixed_layout, we only need one if the
|
||||
// switch is not exhaustive.
|
||||
bool exhaustive = false;
|
||||
auto enumDecl = sourceType->getEnumOrBoundGenericEnum();
|
||||
auto enumDecl = sourceType.getEnumOrBoundGenericEnum();
|
||||
|
||||
// The SIL values will range over Optional, so count against
|
||||
// Optional's cases.
|
||||
|
||||
Reference in New Issue
Block a user