@@ -47,7 +47,6 @@ bool AvailabilityContext::PlatformInfo::constrainWith(
4747 CONSTRAIN_BOOL (IsUnavailableInEmbedded, other.IsUnavailableInEmbedded );
4848 }
4949 isConstrained |= CONSTRAIN_BOOL (IsDeprecated, other.IsDeprecated );
50- isConstrained |= CONSTRAIN_BOOL (AllowsUnsafe, other.AllowsUnsafe );
5150
5251 return isConstrained;
5352}
@@ -65,7 +64,6 @@ bool AvailabilityContext::PlatformInfo::constrainWith(const Decl *decl) {
6564 }
6665
6766 isConstrained |= CONSTRAIN_BOOL (IsDeprecated, decl->isDeprecated ());
68- isConstrained |= CONSTRAIN_BOOL (AllowsUnsafe, decl->allowsUnsafe ());
6967
7068 return isConstrained;
7169}
@@ -131,8 +129,7 @@ AvailabilityContext::forPlatformRange(const AvailabilityRange &range,
131129 PlatformInfo platformInfo{range, PlatformKind::none,
132130 /* IsUnavailable*/ false ,
133131 /* IsUnavailableInEmbedded*/ false ,
134- /* IsDeprecated*/ false ,
135- /* AllowsUnsafe*/ false };
132+ /* IsDeprecated*/ false };
136133 return AvailabilityContext (Storage::get (platformInfo, ctx));
137134}
138135
@@ -155,8 +152,7 @@ AvailabilityContext::get(const AvailabilityRange &platformAvailability,
155152 ? *unavailablePlatform
156153 : PlatformKind::none,
157154 unavailablePlatform.has_value (),
158- /* IsUnavailableInEmbedded*/ false , deprecated,
159- /* AllowsUnsafe*/ false };
155+ /* IsUnavailableInEmbedded*/ false , deprecated};
160156 return AvailabilityContext (Storage::get (platformInfo, ctx));
161157}
162158
@@ -175,10 +171,6 @@ bool AvailabilityContext::isUnavailableInEmbedded() const {
175171 return Info->Platform .IsUnavailableInEmbedded ;
176172}
177173
178- bool AvailabilityContext::allowsUnsafe () const {
179- return Info->Platform .AllowsUnsafe ;
180- }
181-
182174bool AvailabilityContext::isDeprecated () const {
183175 return Info->Platform .IsDeprecated ;
184176}
@@ -195,15 +187,6 @@ void AvailabilityContext::constrainWithDecl(const Decl *decl) {
195187 constrainWithDeclAndPlatformRange (decl, AvailabilityRange::alwaysAvailable ());
196188}
197189
198- void AvailabilityContext::constrainWithAllowsUnsafe (ASTContext &ctx) {
199- if (allowsUnsafe ())
200- return ;
201-
202- PlatformInfo platformInfo{Info->Platform };
203- platformInfo.AllowsUnsafe = true ;
204- Info = Storage::get (platformInfo, ctx);
205- }
206-
207190void AvailabilityContext::constrainWithPlatformRange (
208191 const AvailabilityRange &platformRange, ASTContext &ctx) {
209192 PlatformInfo platformAvailability{Info->Platform };
@@ -251,9 +234,6 @@ void AvailabilityContext::print(llvm::raw_ostream &os) const {
251234
252235 if (isDeprecated ())
253236 os << " deprecated" ;
254-
255- if (allowsUnsafe ())
256- os << " allows_unsafe" ;
257237}
258238
259239void AvailabilityContext::dump () const { print (llvm::errs ()); }
0 commit comments