Add OpenBSD to PlatformKinds.def.

In #31686 changes were introduced to ensure that capacity was stored in
the ManagedBuffer allocation, and @lorentey sugested that as a stopgap
measure for addressing the lack of platform malloc introspection on
OpenBSD, we use Swift availability attributes instead on the relevant
parts of ManagedBuffer and friends.

Since platform availability symbols must be specifically set up to be
used, this commit does so in advance of the above change.
This commit is contained in:
3405691582
2020-08-21 18:27:10 -04:00
parent 6aebda51ce
commit b59910ef5b
8 changed files with 25 additions and 0 deletions

View File

@@ -674,6 +674,7 @@ static void reportAttributes(ASTContext &Ctx,
static UIdent PlatformOSXAppExt("source.availability.platform.osx_app_extension");
static UIdent PlatformtvOSAppExt("source.availability.platform.tvos_app_extension");
static UIdent PlatformWatchOSAppExt("source.availability.platform.watchos_app_extension");
static UIdent PlatformOpenBSD("source.availability.platform.openbsd");
std::vector<const DeclAttribute*> Scratch;
for (auto Attr : getDeclAttributes(D, Scratch)) {
@@ -702,6 +703,8 @@ static void reportAttributes(ASTContext &Ctx,
PlatformUID = PlatformtvOSAppExt; break;
case PlatformKind::watchOSApplicationExtension:
PlatformUID = PlatformWatchOSAppExt; break;
case PlatformKind::OpenBSD:
PlatformUID = PlatformOpenBSD; break;
}
AvailableAttrInfo Info;