mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
[NFC] Silence a bunch of Wunused-variable diagnostics
This commit is contained in:
@@ -157,23 +157,26 @@ void SILLinkerVisitor::linkInVTable(ClassDecl *D) {
|
||||
// Visitors
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
static template<typename Inst>
|
||||
bool applyInstCalleeIsGeneric(Inst AI) {
|
||||
return AI->getCallee()->getType().template castTo<SILFunctionType>()
|
||||
->getGenericSignature();
|
||||
}
|
||||
|
||||
void SILLinkerVisitor::visitApplyInst(ApplyInst *AI) {
|
||||
if (auto sig = AI->getCallee()->getType().castTo<SILFunctionType>()
|
||||
->getGenericSignature()) {
|
||||
if (applyInstCalleeIsGeneric(AI)) {
|
||||
visitApplySubstitutions(AI->getSubstitutionMap());
|
||||
}
|
||||
}
|
||||
|
||||
void SILLinkerVisitor::visitTryApplyInst(TryApplyInst *TAI) {
|
||||
if (auto sig = TAI->getCallee()->getType().castTo<SILFunctionType>()
|
||||
->getGenericSignature()) {
|
||||
if (applyInstCalleeIsGeneric(TAI)) {
|
||||
visitApplySubstitutions(TAI->getSubstitutionMap());
|
||||
}
|
||||
}
|
||||
|
||||
void SILLinkerVisitor::visitPartialApplyInst(PartialApplyInst *PAI) {
|
||||
if (auto sig = PAI->getCallee()->getType().castTo<SILFunctionType>()
|
||||
->getGenericSignature()) {
|
||||
if (applyInstCalleeIsGeneric(PAI)) {
|
||||
visitApplySubstitutions(PAI->getSubstitutionMap());
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user