File tree Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -736,9 +736,9 @@ void ASTMangler::appendOpaqueDeclName(const OpaqueTypeDecl *opaqueDecl) {
736
736
if (canSymbolicReference (opaqueDecl)) {
737
737
appendSymbolicReference (opaqueDecl);
738
738
} else if (auto namingDecl = opaqueDecl->getNamingDecl ()) {
739
- CanGenericSignature savedSignature = CurGenericSignature;
739
+ llvm::SaveAndRestore<CanGenericSignature> savedSignature (
740
+ CurGenericSignature);
740
741
appendEntity (namingDecl);
741
- CurGenericSignature = savedSignature;
742
742
appendOperator (" QO" );
743
743
} else {
744
744
llvm_unreachable (" todo: independent opaque type decls" );
@@ -2667,11 +2667,11 @@ void ASTMangler::appendConcreteProtocolConformance(
2667
2667
opaqueSignature->getConformanceAccessPath (opaqueTypeParam, proto);
2668
2668
2669
2669
// Append the conformance access path with the signature of the opaque type.
2670
- CanGenericSignature savedSignature = CurGenericSignature;
2671
- CurGenericSignature = opaqueSignature-> getCanonicalSignature ();
2672
- appendDependentProtocolConformance (conformanceAccessPath );
2673
- CurGenericSignature = savedSignature ;
2674
-
2670
+ {
2671
+ llvm::SaveAndRestore<CanGenericSignature> savedSignature (
2672
+ CurGenericSignature, opaqueSignature-> getCanonicalSignature () );
2673
+ appendDependentProtocolConformance (conformanceAccessPath) ;
2674
+ }
2675
2675
appendType (canType);
2676
2676
appendOperator (" HO" );
2677
2677
} else {
You can’t perform that action at this time.
0 commit comments