Skip to content

Commit a6427ca

Browse files
committed
[Features] Add an experimental RuntimeDiscoverableAttrs feature flag
Guards functionality related to `@runtimeMetadata` attribute.
1 parent a577c98 commit a6427ca

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

include/swift/Basic/Features.def

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,10 @@ EXPERIMENTAL_FEATURE(Macros, false)
154154
/// corresponding syntax tree.
155155
EXPERIMENTAL_FEATURE(BuiltinMacros, false)
156156

157+
/// Whether to enable experimental @runtimeMetadata feature which allows to
158+
/// declare an attribute which is discoverable and constructable at runtime.
159+
EXPERIMENTAL_FEATURE(RuntimeDiscoverableAttrs, false)
160+
157161
#undef EXPERIMENTAL_FEATURE
158162
#undef UPCOMING_FEATURE
159163
#undef SUPPRESSIBLE_LANGUAGE_FEATURE

lib/AST/ASTPrinter.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2930,6 +2930,10 @@ static bool usesFeatureTypeWrappers(Decl *decl) {
29302930
return decl->getAttrs().hasAttribute<TypeWrapperAttr>();
29312931
}
29322932

2933+
static bool usesFeatureRuntimeDiscoverableAttrs(Decl *decl) {
2934+
return false;
2935+
}
2936+
29332937
static bool usesFeatureParserRoundTrip(Decl *decl) {
29342938
return false;
29352939
}

0 commit comments

Comments
 (0)