Merge remote-tracking branch 'origin/master' into master-rebranch

This commit is contained in:
swift-ci
2020-02-03 22:43:48 -08:00
2 changed files with 16 additions and 1 deletions

View File

@@ -397,7 +397,12 @@ template <typename LTy> struct tupleextractoperation_ty {
unsigned index;
tupleextractoperation_ty(const LTy &Left, unsigned i) : L(Left), index(i) {}
bool match(SILValue v) { return match(v->getDefiningInstruction()); }
bool match(SILValue v) {
auto *inst = v->getDefiningInstruction();
if (!inst)
return false;
return match(inst);
}
template <typename ITy> bool match(ITy *V) {
if (auto *TEI = dyn_cast<TupleExtractInst>(V)) {