Skip to content

Commit b58d981

Browse files
committed
---
yaml --- r: 348991 b: refs/heads/master c: 97339a6 h: refs/heads/master i: 348989: 01f6b6b 348987: 7330db1 348983: cf5430b 348975: 5653a03 348959: 4b99b7c 348927: 6164303
1 parent e9fd257 commit b58d981

File tree

2 files changed

+12
-5
lines changed

2 files changed

+12
-5
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
refs/heads/master: 9e89d56c57b4bdb63efc6dbc67942fcd63320f27
2+
refs/heads/master: 97339a6aceee09d417f17c31dc272a6475c0ff63
33
refs/heads/master-next: 203b3026584ecad859eb328b2e12490099409cd5
44
refs/tags/osx-passed: b6b74147ef8a386f532cf9357a1bde006e552c54
55
refs/tags/swift-2.2-SNAPSHOT-2015-12-01-a: 6bb18e013c2284f2b45f5f84f2df2887dc0f7dea

trunk/lib/AST/ASTMangler.cpp

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2649,10 +2649,17 @@ void ASTMangler::appendDependentProtocolConformance(
26492649
void ASTMangler::appendConcreteProtocolConformance(
26502650
const ProtocolConformance *conformance) {
26512651
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);
26562663

26572664
// Conforming type.
26582665
Type conformingType = conformance->getType();

0 commit comments

Comments
 (0)