File tree Expand file tree Collapse file tree 2 files changed +12
-5
lines changed Expand file tree Collapse file tree 2 files changed +12
-5
lines changed Original file line number Diff line number Diff line change 1
1
---
2
- refs/heads/master: 9e89d56c57b4bdb63efc6dbc67942fcd63320f27
2
+ refs/heads/master: 97339a6aceee09d417f17c31dc272a6475c0ff63
3
3
refs/heads/master-next: 203b3026584ecad859eb328b2e12490099409cd5
4
4
refs/tags/osx-passed: b6b74147ef8a386f532cf9357a1bde006e552c54
5
5
refs/tags/swift-2.2-SNAPSHOT-2015-12-01-a: 6bb18e013c2284f2b45f5f84f2df2887dc0f7dea
Original file line number Diff line number Diff line change @@ -2649,10 +2649,17 @@ void ASTMangler::appendDependentProtocolConformance(
2649
2649
void ASTMangler::appendConcreteProtocolConformance (
2650
2650
const ProtocolConformance *conformance) {
2651
2651
auto module = conformance->getDeclContext ()->getParentModule ();
2652
- if (!CurGenericSignature && conformance->getGenericSignature ()) {
2653
- CurGenericSignature =
2654
- conformance->getGenericSignature ()->getCanonicalSignature ();
2655
- }
2652
+
2653
+ // It's possible that we might not have a generic signature here to get
2654
+ // the conformance access path (for example, when mangling types for
2655
+ // debugger). In that case, we can use the generic signature of the
2656
+ // conformance (if it's present).
2657
+ auto conformanceSig = conformance->getGenericSignature ();
2658
+ auto shouldUseConformanceSig = !CurGenericSignature && conformanceSig;
2659
+ llvm::SaveAndRestore<CanGenericSignature> savedSignature (
2660
+ CurGenericSignature, shouldUseConformanceSig
2661
+ ? conformanceSig->getCanonicalSignature ()
2662
+ : CurGenericSignature);
2656
2663
2657
2664
// Conforming type.
2658
2665
Type conformingType = conformance->getType ();
You can’t perform that action at this time.
0 commit comments