Replace classifyAsOptionalType with isOptionalDecl.

This commit is contained in:
Mark Lacey
2018-02-01 11:08:58 -08:00
parent b4b66bc8e8
commit 7f805ba2bc
13 changed files with 34 additions and 86 deletions

View File

@@ -1874,7 +1874,7 @@ void PatternMatchEmission::emitEnumElementDispatchWithOwnership(
->getCanonicalType();
AbstractionPattern origEltTy =
(elt->getParentEnum()->classifyAsOptionalType()
(elt->getParentEnum()->isOptionalDecl()
? AbstractionPattern(substEltTy)
: SGF.SGM.M.Types.getAbstractionPattern(elt));
@@ -2174,9 +2174,9 @@ void PatternMatchEmission::emitEnumElementDispatch(
->getCanonicalType();
AbstractionPattern origEltTy =
(elt->getParentEnum()->classifyAsOptionalType()
? AbstractionPattern(substEltTy)
: SGF.SGM.M.Types.getAbstractionPattern(elt));
(elt->getParentEnum()->isOptionalDecl()
? AbstractionPattern(substEltTy)
: SGF.SGM.M.Types.getAbstractionPattern(elt));
eltCMV = emitReabstractedSubobject(SGF, loc, eltCMV, *eltTL,
origEltTy, substEltTy);