Skip to content

Commit f2e2e94

Browse files
committed
[DebugInfo] Emit debug info for witness tables
This change emits debug info for witness tables passed into generic functions when a generic type is constrained to a protocol. This information is required for LLDB's generic expression evaluator to work in such functions. rdar://104446865
1 parent e6c772b commit f2e2e94

8 files changed

+174
-90
lines changed

lib/IRGen/IRGenDebugInfo.cpp

Lines changed: 52 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -279,8 +279,16 @@ class IRGenDebugInfoImpl : public IRGenDebugInfo {
279279
DebugTypeInfo DebugType,
280280
bool IsLocalToUnit,
281281
std::optional<SILLocation> Loc);
282+
283+
void emitArtificialVariable(IRGenFunction &IGF, llvm::Value *Metadata,
284+
StringRef Name, StringRef Identifier);
285+
282286
void emitTypeMetadata(IRGenFunction &IGF, llvm::Value *Metadata,
283287
unsigned Depth, unsigned Index, StringRef Name);
288+
289+
void emitWitnessTable(IRGenFunction &IGF, llvm::Value *Metadata,
290+
StringRef Name, ProtocolDecl *protocol);
291+
284292
void emitPackCountParameter(IRGenFunction &IGF, llvm::Value *Metadata,
285293
SILDebugVariable VarInfo);
286294

@@ -3716,9 +3724,10 @@ void IRGenDebugInfoImpl::emitGlobalVariableDeclaration(
37163724
Var->addDebugInfo(GV);
37173725
}
37183726

3719-
void IRGenDebugInfoImpl::emitTypeMetadata(IRGenFunction &IGF,
3720-
llvm::Value *Metadata, unsigned Depth,
3721-
unsigned Index, StringRef Name) {
3727+
void IRGenDebugInfoImpl::emitArtificialVariable(IRGenFunction &IGF,
3728+
llvm::Value *Metadata,
3729+
StringRef Name,
3730+
StringRef Identifier) {
37223731
if (Opts.DebugInfoLevel <= IRGenDebugInfoLevel::LineTables)
37233732
return;
37243733

@@ -3727,23 +3736,44 @@ void IRGenDebugInfoImpl::emitTypeMetadata(IRGenFunction &IGF,
37273736
if (!DS || DS->getInlinedFunction()->isTransparent())
37283737
return;
37293738

3730-
llvm::SmallString<8> Buf;
3731-
static const char *Tau = SWIFT_UTF8("\u03C4");
3732-
llvm::raw_svector_ostream OS(Buf);
3733-
OS << '$' << Tau << '_' << Depth << '_' << Index;
3734-
uint64_t PtrWidthInBits = CI.getTargetInfo().getPointerWidth(clang::LangAS::Default);
3739+
auto id = IGF.getSwiftModule()->getASTContext().getIdentifier(Name);
3740+
uint64_t PtrWidthInBits =
3741+
CI.getTargetInfo().getPointerWidth(clang::LangAS::Default);
37353742
assert(PtrWidthInBits % 8 == 0);
37363743
auto DbgTy = DebugTypeInfo::getTypeMetadata(
3737-
getMetadataType(Name)->getDeclaredInterfaceType().getPointer(),
3744+
getMetadataType(Identifier)->getDeclaredInterfaceType().getPointer(),
37383745
Size(PtrWidthInBits / 8),
37393746
Alignment(CI.getTargetInfo().getPointerAlign(clang::LangAS::Default)));
3740-
emitVariableDeclaration(IGF.Builder, Metadata, DbgTy, IGF.getDebugScope(),
3741-
{}, {OS.str().str(), 0, false},
3742-
// swift.type is already a pointer type,
3743-
// having a shadow copy doesn't add another
3744-
// layer of indirection.
3745-
IGF.isAsync() ? CoroDirectValue : DirectValue,
3746-
ArtificialValue);
3747+
emitVariableDeclaration(
3748+
IGF.Builder, Metadata, DbgTy, IGF.getDebugScope(), {},
3749+
{id.str(), 0, false}, // swift.type is already a pointer type,
3750+
// having a shadow copy doesn't add another
3751+
// layer of indirection.
3752+
IGF.isAsync() ? CoroDirectValue : DirectValue, ArtificialValue);
3753+
}
3754+
3755+
void IRGenDebugInfoImpl::emitTypeMetadata(IRGenFunction &IGF,
3756+
llvm::Value *Metadata, unsigned Depth,
3757+
unsigned Index, StringRef Name) {
3758+
llvm::SmallString<8> Buf;
3759+
static const char *Tau = SWIFT_UTF8("\u03C4");
3760+
llvm::raw_svector_ostream OS(Buf);
3761+
OS << '$' << Tau << '_' << Depth << '_' << Index;
3762+
3763+
emitArtificialVariable(IGF, Metadata, OS.str(), Name);
3764+
}
3765+
3766+
void IRGenDebugInfoImpl::emitWitnessTable(IRGenFunction &IGF,
3767+
llvm::Value *Metadata, StringRef Name,
3768+
ProtocolDecl *protocol) {
3769+
llvm::SmallString<64> Buf;
3770+
static const char *Tau = SWIFT_UTF8("\u03C4");
3771+
llvm::raw_svector_ostream OS(Buf);
3772+
DebugTypeInfo DbgTy(protocol->getInterfaceType());
3773+
auto MangledName = getMangledName(DbgTy);
3774+
OS << "$WT_" << '_' << Name << "_" << MangledName;
3775+
3776+
emitArtificialVariable(IGF, Metadata, OS.str(), Buf.str());
37473777
}
37483778

37493779
void IRGenDebugInfoImpl::emitPackCountParameter(IRGenFunction &IGF,
@@ -3888,6 +3918,12 @@ void IRGenDebugInfo::emitTypeMetadata(IRGenFunction &IGF, llvm::Value *Metadata,
38883918
Depth, Index, Name);
38893919
}
38903920

3921+
void IRGenDebugInfo::emitWitnessTable(IRGenFunction &IGF, llvm::Value *Metadata,
3922+
StringRef Name, ProtocolDecl *protocol) {
3923+
static_cast<IRGenDebugInfoImpl *>(this)->emitWitnessTable(IGF, Metadata, Name,
3924+
protocol);
3925+
}
3926+
38913927
void IRGenDebugInfo::emitPackCountParameter(IRGenFunction &IGF,
38923928
llvm::Value *Metadata,
38933929
SILDebugVariable VarInfo) {

lib/IRGen/IRGenDebugInfo.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -188,6 +188,10 @@ class IRGenDebugInfo {
188188
void emitTypeMetadata(IRGenFunction &IGF, llvm::Value *Metadata,
189189
unsigned Depth, unsigned Index, StringRef Name);
190190

191+
/// Emit debug metadata for a (protocol) witness table.
192+
void emitWitnessTable(IRGenFunction &IGF, llvm::Value *Metadata,
193+
StringRef Name, ProtocolDecl *protocol);
194+
191195
/// Emit debug info for the IR function parameter holding the size of one or
192196
/// more parameter / type packs.
193197
void emitPackCountParameter(IRGenFunction &IGF, llvm::Value *Metadata,

lib/IRGen/LocalTypeData.cpp

Lines changed: 26 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -412,22 +412,35 @@ static void maybeEmitDebugInfoForLocalTypeData(IRGenFunction &IGF,
412412
if (DS && DS->getInlinedFunction() &&
413413
DS->getInlinedFunction()->isTransparent())
414414
return;
415-
416-
// Only for formal type metadata.
417-
if (key.Kind != LocalTypeDataKind::forFormalTypeMetadata())
415+
// For formal type metadata and witness tables.
416+
ProtocolDecl *proto = nullptr;
417+
418+
if (key.Kind.isAbstractProtocolConformance())
419+
proto = key.Kind.getAbstractProtocolConformance();
420+
else if (key.Kind.isConcreteProtocolConformance())
421+
proto = key.Kind.getConcreteProtocolConformance()->getProtocol();
422+
else if (key.Kind != LocalTypeDataKind::forFormalTypeMetadata())
418423
return;
419424

420425
// Only for archetypes, and not for opened/opaque archetypes.
421426
auto type = dyn_cast<ArchetypeType>(key.Type);
422427
if (!type)
423428
return;
424-
if (!type->isRoot())
429+
if (!type->isRoot() && !proto)
425430
return;
426431
if (!isa<PrimaryArchetypeType>(type) && !isa<PackArchetypeType>(type))
427432
return;
428433

429-
auto *typeParam = type->getInterfaceType()->castTo<GenericTypeParamType>();
430-
auto name = typeParam->getName().str();
434+
auto interfaceType = type->getInterfaceType();
435+
std::string name;
436+
if (auto DMT =
437+
llvm::dyn_cast<DependentMemberType>(interfaceType.getPointer())) {
438+
name = DMT->getString();
439+
} else if (auto GTPT = llvm::dyn_cast<GenericTypeParamType>(
440+
interfaceType.getPointer()))
441+
name = GTPT->getName().str();
442+
else
443+
assert(false && "Unexpected interface type");
431444

432445
llvm::Value *data = value.getMetadata();
433446

@@ -447,10 +460,13 @@ static void maybeEmitDebugInfoForLocalTypeData(IRGenFunction &IGF,
447460
if (!IGF.IGM.DebugInfo)
448461
return;
449462

450-
IGF.IGM.DebugInfo->emitTypeMetadata(IGF, data,
451-
typeParam->getDepth(),
452-
typeParam->getIndex(),
453-
name);
463+
if (proto) {
464+
IGF.IGM.DebugInfo->emitWitnessTable(IGF, data, name, proto);
465+
} else {
466+
auto *typeParam = type->getInterfaceType()->castTo<GenericTypeParamType>();
467+
IGF.IGM.DebugInfo->emitTypeMetadata(IGF, data, typeParam->getDepth(),
468+
typeParam->getIndex(), name);
469+
}
454470
}
455471

456472
void

test/DebugInfo/move_function_dbginfo.swift

Lines changed: 6 additions & 62 deletions
Original file line numberDiff line numberDiff line change
@@ -237,19 +237,19 @@ public func copyableVarArgTest(_ k: inout Klass) {
237237
// DWARF-NEXT: DW_AT_artificial (true)
238238
//
239239
// DWARF: DW_TAG_variable
240+
// DWARF: DW_AT_location
241+
// DWARF: DW_AT_name ("$WT_\317\204_T_$s3out1P_pmD")
242+
// DWARF: DW_AT_type (
243+
// DWARF: DW_AT_artificial (true)
244+
//
245+
// DWARF: DW_TAG_variable
240246
// DWARF-NEXT: DW_AT_location (0x{{[a-z0-9]+}}:
241247
// DWARF-NEXT: [0x{{[a-z0-9]+}}, 0x{{[a-z0-9]+}}):
242248
// DWARF-NEXT: DW_AT_name ("k")
243249
// DWARF-NEXT: DW_AT_decl_file (
244250
// DWARF-NEXT: DW_AT_decl_line (
245251
// DWARF-NEXT: DW_AT_type (
246252
//
247-
// DWARF: DW_TAG_variable
248-
// DWARF-NEXT: DW_AT_location (
249-
// DWARF-NEXT: DW_AT_name ("m")
250-
// DWARF-NEXT: DW_AT_decl_file (
251-
// DWARF-NEXT: DW_AT_decl_line (
252-
// DWARF-NEXT: DW_AT_type (
253253
public func addressOnlyValueTest<T : P>(_ x: T) {
254254
let k = x
255255
k.doSomething()
@@ -265,33 +265,6 @@ public func addressOnlyValueTest<T : P>(_ x: T) {
265265
// CHECK: ret void
266266
// CHECK-NEXT: }
267267
//
268-
// DWARF: DW_AT_linkage_name ("$s3out23addressOnlyValueArgTestyyxnAA1PRzlF")
269-
// DWARF-NEXT: DW_AT_name ("addressOnlyValueArgTest")
270-
// DWARF-NEXT: DW_AT_decl_file (
271-
// DWARF-NEXT: DW_AT_decl_line (
272-
// DWARF-NEXT: DW_AT_type (
273-
// DWARF-NEXT: DW_AT_external (
274-
//
275-
// DWARF: DW_TAG_formal_parameter
276-
// DWARF-NEXT: DW_AT_location (0x{{[a-z0-9]+}}:
277-
// DWARF-NEXT: [0x{{[a-z0-9]+}}, 0x{{[a-z0-9]+}}):
278-
// DWARF-NEXT: DW_AT_name ("k")
279-
// DWARF-NEXT: DW_AT_decl_file (
280-
// DWARF-NEXT: DW_AT_decl_line (
281-
// DWARF-NEXT: DW_AT_type (
282-
//
283-
// DWARF: DW_TAG_variable
284-
// DWARF-NEXT: DW_AT_location (
285-
// DWARF-NEXT: DW_AT_name ("$\317\204_0_0")
286-
// DWARF-NEXT: DW_AT_type (
287-
// DWARF-NEXT: DW_AT_artificial (true)
288-
//
289-
// DWARF: DW_TAG_variable
290-
// DWARF-NEXT: DW_AT_location (
291-
// DWARF-NEXT: DW_AT_name ("m")
292-
// DWARF-NEXT: DW_AT_decl_file (
293-
// DWARF-NEXT: DW_AT_decl_line (
294-
// DWARF-NEXT: DW_AT_type (
295268
public func addressOnlyValueArgTest<T : P>(_ k: __owned T) {
296269
k.doSomething()
297270
let m = consume k
@@ -306,35 +279,6 @@ public func addressOnlyValueArgTest<T : P>(_ k: __owned T) {
306279
// CHECK: ret void
307280
// CHECK-NEXT: }
308281
//
309-
// DWARF: DW_AT_linkage_name ("$s3out18addressOnlyVarTestyyxAA1PRzlF")
310-
// DWARF-NEXT: DW_AT_name ("addressOnlyVarTest")
311-
// DWARF-NEXT: DW_AT_decl_file (
312-
// DWARF-NEXT: DW_AT_decl_line (
313-
// DWARF-NEXT: DW_AT_type (
314-
// DWARF-NEXT: DW_AT_external (
315-
//
316-
// DWARF: DW_TAG_formal_parameter
317-
// DWARF-NEXT: DW_AT_location (
318-
// DWARF-NEXT: DW_AT_name ("x")
319-
// DWARF-NEXT: DW_AT_decl_file (
320-
// DWARF-NEXT: DW_AT_decl_line (
321-
// DWARF-NEXT: DW_AT_type (
322-
//
323-
// DWARF: DW_TAG_variable
324-
// DWARF-NEXT: DW_AT_location (
325-
// DWARF-NEXT: DW_AT_name ("$\317\204_0_0")
326-
// DWARF-NEXT: DW_AT_type (
327-
// DWARF-NEXT: DW_AT_artificial (true)
328-
//
329-
// DWARF: DW_TAG_variable
330-
// DWARF-NEXT: DW_AT_location (0x{{[a-z0-9]+}}:
331-
// DWARF-NEXT: [0x{{[a-z0-9]+}}, 0x{{[a-z0-9]+}}):
332-
// TODO: Missing def in dbg info here.
333-
// DWARF-NEXT: [0x{{[a-z0-9]+}}, 0x{{[a-z0-9]+}}):
334-
// DWARF-NEXT: DW_AT_name ("k")
335-
// DWARF-NEXT: DW_AT_decl_file (
336-
// DWARF-NEXT: DW_AT_decl_line (
337-
// DWARF-NEXT: DW_AT_type (
338282
public func addressOnlyVarTest<T : P>(_ x: T) {
339283
var k = x // << this
340284
k.doSomething()

test/DebugInfo/witness_table.swift

Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
// RUN: %target-swift-frontend %s -emit-ir -g -o -
2+
import StdlibUnittest
3+
protocol P1 {}
4+
protocol P2 {}
5+
protocol P3 {}
6+
protocol P4 {}
7+
protocol P5 {}
8+
9+
struct I: P1, P2, P4 {}
10+
struct I2: P3 {}
11+
struct I3: P5 {}
12+
13+
struct S<T, U: P3> where T: P1, T: P2 {
14+
let t: T
15+
let u: U
16+
17+
func foo() {
18+
}
19+
//CHECK: ![[foo:[0-9]+]] = distinct !DISubprogram(name: "foo", linkageName: "$s13witness_table1SV3fooyyF",
20+
//CHECK: !DILocalVariable(name: "$WT_T_$s13witness_table2P1_pmD", scope: ![[foo]], {{.*}}, flags: DIFlagArtificial)
21+
//CHECK: !DILocalVariable(name: "$WT_T_$s13witness_table2P2_pmD", scope: ![[foo]], {{.*}}, flags: DIFlagArtificial)
22+
//CHECK: !DILocalVariable(name: "$\CF\84_0_0", scope: ![[foo]], {{.*}}, flags: DIFlagArtificial)
23+
//CHECK: !DILocalVariable(name: "$WT_U_$s13witness_table2P3_pmD", scope: ![[foo]], {{.*}}, flags: DIFlagArtificial)
24+
//CHECK: !DILocalVariable(name: "$\CF\84_0_1", scope: ![[foo]], {{.*}}, flags: DIFlagArtificial)
25+
26+
func bar<V: P4>(v: V) {
27+
}
28+
//CHECK: ![[bar:[0-9]+]] = distinct !DISubprogram(name: "bar", linkageName: "$s13witness_table1SV3bar1vyqd___tAA2P4Rd__lF",
29+
//CHECK: !DILocalVariable(name: "$\CF\84_1_0", scope: ![[bar]], {{.*}}, flags: DIFlagArtificial)
30+
//CHECK: !DILocalVariable(name: "$WT_V_$s13witness_table2P4_pmD", scope: ![[bar]], {{.*}}, flags: DIFlagArtificial)
31+
//CHECK: !DILocalVariable(name: "$WT_T_$s13witness_table2P1_pmD", scope: ![[bar]], {{.*}}, flags: DIFlagArtificial)
32+
//CHECK: !DILocalVariable(name: "$WT_T_$s13witness_table2P2_pmD", scope: ![[bar]], {{.*}}, flags: DIFlagArtificial)
33+
//CHECK: !DILocalVariable(name: "$\CF\84_0_0", scope: ![[bar]], {{.*}}, flags: DIFlagArtificial)
34+
//CHECK: !DILocalVariable(name: "$WT_U_$s13witness_table2P3_pmD", scope: ![[bar]], {{.*}}, flags: DIFlagArtificial)
35+
//CHECK: !DILocalVariable(name: "$\CF\84_0_1", scope: ![[bar]], {{.*}}, flags: DIFlagArtificial)
36+
}
37+
38+
extension S where T: P5 {
39+
func baz() {
40+
}
41+
42+
//CHECK: ![[baz:[0-9]+]] = distinct !DISubprogram(name: "baz", linkageName: "$s13witness_table1SVA2A2P5RzrlE3bazyyF",
43+
//CHECK: !DILocalVariable(name: "$WT_T_$s13witness_table2P5_pmD", scope: ![[baz]], {{.*}}, flags: DIFlagArtificial)
44+
//CHECK: !DILocalVariable(name: "$WT_T_$s13witness_table2P1_pmD", scope: ![[baz]], {{.*}}, flags: DIFlagArtificial)
45+
//CHECK: !DILocalVariable(name: "$WT_T_$s13witness_table2P2_pmD", scope: ![[baz]], {{.*}}, flags: DIFlagArtificial)
46+
//CHECK: !DILocalVariable(name: "$\CF\84_0_0", scope: ![[baz]], {{.*}}, flags: DIFlagArtificial)
47+
//CHECK: !DILocalVariable(name: "$WT_U_$s13witness_table2P3_pmD", scope: ![[baz]], {{.*}}, flags: DIFlagArtificial)
48+
//CHECK: !DILocalVariable(name: "$\CF\84_0_1", scope: ![[baz]], {{.*}}, flags: DIFlagArtificial)
49+
}
50+
51+
S(t: I(), u: I2())
52+
53+
func freeFunc<T1: P1, T2>(t1: T1, t2: T2) where T2: P3, T2: P4 {
54+
}
55+
//CHECK: ![[freeFunc:[0-9]+]] = distinct !DISubprogram(name: "freeFunc", linkageName: "$s13witness_table8freeFunc2t12t2yx_q_tAA2P1RzAA2P3R_AA2P4R_r0_lF",
56+
//CHECK: !DILocalVariable(name: "$\CF\84_0_0", scope: ![[freeFunc]], {{.*}}, flags: DIFlagArtificial)
57+
//CHECK: !DILocalVariable(name: "$\CF\84_0_1", scope: ![[freeFunc]], {{.*}}, flags: DIFlagArtificial)
58+
//CHECK: !DILocalVariable(name: "$WT_T1_$s13witness_table2P1_pmD", scope: ![[freeFunc]], {{.*}}, flags: DIFlagArtificial)
59+
//CHECK: !DILocalVariable(name: "$WT_T2_$s13witness_table2P3_pmD", scope: ![[freeFunc]], {{.*}}, flags: DIFlagArtificial)
60+
//CHECK: !DILocalVariable(name: "$WT_T2_$s13witness_table2P4_pmD", scope: ![[freeFunc]], {{.*}}, flags: DIFlagArtificial)
61+
62+
protocol A {
63+
associatedtype Element
64+
}
65+
66+
func withAssociatedType<T: A>(_: T) where T.Element: A {
67+
}
68+
69+
//CHECK: ![[withAssociatedType:[0-9]+]] = distinct !DISubprogram(name: "withAssociatedType", linkageName: "$s13witness_table18withAssociatedTypeyyxAA1ARzAaC7ElementRpzlF"
70+
//CHECK: !DILocalVariable(name: "$\CF\84_0_0", scope: ![[withAssociatedType]], {{.*}}, flags: DIFlagArtificial)
71+
//CHECK: !DILocalVariable(name: "$WT_T_$s13witness_table1A_pmD", scope: ![[withAssociatedType]], {{.*}}, flags: DIFlagArtificial)
72+
//CHECK: !DILocalVariable(name: "$WT_T.Element_$s13witness_table1A_pmD", scope: ![[withAssociatedType]], {{.*}}, flags: DIFlagArtificial)
73+

test/IRGen/conformance_access_path.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ extension Validatable {
1919
public func tested<S: ValidationSuite>(by suite: S.Type) where S.InputType == Self {
2020
// CHECK: [[S_AS_VALIDATION_SUITE_GEP:%[0-9]+]] = getelementptr inbounds ptr, ptr %S.ValidationSuite, i32 1
2121
// CHECK: [[S_AS_VALIDATION_SUITE:%.*]] = load ptr, ptr [[S_AS_VALIDATION_SUITE_GEP]]
22-
// CHECK-NEXT: call swiftcc ptr @swift_getAssociatedConformanceWitness(ptr %S.Validator, ptr %S, ptr %Self,
22+
// CHECK: call swiftcc ptr @swift_getAssociatedConformanceWitness(ptr %S.Validator, ptr %S, ptr %Self,
2323
tested()
2424
}
2525
}

test/IRGen/opaque_result_with_conditional_availability.swift

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -181,10 +181,12 @@ func test_multiple_generic<T: P>(_ t: T) -> some P {
181181
// CHECK: define private ptr @"get_underlying_type_ref 43opaque_result_with_conditional_availabilityAA21test_multiple_genericyQrxAA1PRzlFQOQr"(ptr %0)
182182
// CHECK-NEXT: entry:
183183
// CHECK-NEXT: %"\CF\84_0_01" = alloca ptr
184+
// CHECK-NEXT: %"\CF\84_0_02" = alloca ptr
184185
// CHECK-NEXT: %"\CF\84_0_0" = load ptr, ptr %0
185186
// CHECK-NEXT: store ptr %"\CF\84_0_0", ptr %"\CF\84_0_01"
186187
// CHECK-NEXT: %1 = getelementptr inbounds ptr, ptr %0, i32 1
187188
// CHECK-NEXT: %"\CF\84_0_0.P" = load ptr, ptr %1
189+
// CHECK-NEXT: store ptr %"\CF\84_0_0.P", ptr %"\CF\84_0_02"
188190
// CHECK-NEXT: br label %conditional-0
189191
// CHECK: conditional-0: ; preds = %entry
190192
// CHECK-NEXT: br label %cond-0-0
@@ -201,10 +203,12 @@ func test_multiple_generic<T: P>(_ t: T) -> some P {
201203
// CHECK: define private ptr @"get_underlying_witness 43opaque_result_with_conditional_availabilityAA21test_multiple_genericyQrxAA1PRzlFQOqd__AaCHC"(ptr %0)
202204
// CHECK-NEXT: entry:
203205
// CHECK-NEXT: %"\CF\84_0_01" = alloca ptr, align 8
206+
// CHECK-NEXT: %"\CF\84_0_02" = alloca ptr, align 8
204207
// CHECK-NEXT: %"\CF\84_0_0" = load ptr, ptr %0, align 8
205208
// CHECK-NEXT: store ptr %"\CF\84_0_0", ptr %"\CF\84_0_01", align 8
206209
// CHECK-NEXT: %1 = getelementptr inbounds ptr, ptr %0, i32 1
207210
// CHECK-NEXT: %"\CF\84_0_0.P" = load ptr, ptr %1, align 8
211+
// CHECK-NEXT: store ptr %"\CF\84_0_0.P", ptr %"\CF\84_0_02"
208212
// CHECK-NEXT: br label %conditional-0
209213
// CHECK: conditional-0: ; preds = %entry
210214
// CHECK-NEXT: br label %cond-0-0

0 commit comments

Comments
 (0)