[NFC] Silence a bunch of Wunused-variable diagnostics

This commit is contained in:
Robert Widmann
2018-08-24 15:16:40 -07:00
parent e4388af6be
commit 014fd952ef
21 changed files with 35 additions and 35 deletions

View File

@@ -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());
}
}