Add CanType::getOptionalObjectType for staging a rename.

In order to replace uses of getAnyOptionalObjectType() with
getOptionalObjectType(), we need to update LLDB. But in order
to do that, we need to have the version of this function for
CanType available.

So this adds this, as a temporary measure, to facilitate the LLDB
update that will unblock the compiler rename.
This commit is contained in:
Mark Lacey
2018-02-02 21:42:08 -08:00
parent f51d925d01
commit b253f94247
2 changed files with 12 additions and 0 deletions

View File

@@ -391,6 +391,7 @@ class CanType : public Type {
static bool isObjCExistentialTypeImpl(CanType type);
static CanType getAnyOptionalObjectTypeImpl(CanType type,
OptionalTypeKind &kind);
static CanType getOptionalObjectTypeImpl(CanType type);
static CanType getReferenceStorageReferentImpl(CanType type);
static CanType getWithoutSpecifierTypeImpl(CanType type);
@@ -457,6 +458,10 @@ public:
NominalTypeDecl *getAnyNominal() const;
GenericTypeDecl *getAnyGeneric() const;
CanType getOptionalObjectType() const {
return getOptionalObjectTypeImpl(*this);
}
CanType getAnyOptionalObjectType() const {
OptionalTypeKind kind;
return getAnyOptionalObjectTypeImpl(*this, kind);