File tree Expand file tree Collapse file tree 1 file changed +2
-3
lines changed
lib/SILOptimizer/Transforms Expand file tree Collapse file tree 1 file changed +2
-3
lines changed Original file line number Diff line number Diff line change @@ -111,8 +111,7 @@ void OpaqueSpecializerCloner::insertOpaqueToConcreteAddressCasts(
111
111
auto argIdx = apply.getCalleeArgIndex (opd);
112
112
auto argType = substConv.getSILArgumentType (argIdx);
113
113
if (argConv.isIndirectConvention () &&
114
- argType.getASTType ()->hasOpaqueArchetype () &&
115
- !opd.get ()->getType ().getASTType ()->hasOpaqueArchetype ()) {
114
+ argType.getASTType () != opd.get ()->getType ().getASTType ()) {
116
115
auto cast = getBuilder ().createUncheckedAddrCast (apply.getLoc (),
117
116
opd.get (), argType);
118
117
opd.set (cast);
@@ -131,7 +130,7 @@ class OpaqueArchetypeSpecializer : public SILFunctionTransform {
131
130
for (auto &inst : BB) {
132
131
auto *allocStack = dyn_cast<AllocStackInst>(&inst);
133
132
if (!allocStack ||
134
- !allocStack->getElementType ().is <OpaqueTypeArchetypeType> ())
133
+ !allocStack->getElementType ().getASTType ()-> hasOpaqueArchetype ())
135
134
continue ;
136
135
foundOpaqueArchetype = true ;
137
136
break ;
You can’t perform that action at this time.
0 commit comments