Skip to content

Commit 8eb3058

Browse files
committed
[NFC] Pass calculated metadata along.
Don't make the witness table emission look up the cached metadata again.
1 parent 6378efe commit 8eb3058

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

lib/IRGen/GenPack.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -689,9 +689,8 @@ llvm::Value *irgen::emitTypeMetadataPackElementRef(
689689
auto response = IGF.emitTypeMetadataRef(ty, request);
690690
auto *metadata = response.getMetadata();
691691
for (auto protocol : protocols) {
692-
llvm::Value *_metadata = nullptr;
693692
auto *wtable =
694-
emitWitnessTableRef(IGF, ty, /*srcMetadataCache=*/&_metadata,
693+
emitWitnessTableRef(IGF, ty, /*srcMetadataCache=*/&metadata,
695694
ProtocolConformanceRef(protocol));
696695
wtables.push_back(wtable);
697696
}

0 commit comments

Comments
 (0)