mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Merge pull request #81306 from gottesmm/pr-b6ba1a771d90007a5ee6da3e4dc657bfef32b320
[swift-settings] Now that we aren't using it immediately, remove it from tree.
This commit is contained in:
@@ -3051,8 +3051,6 @@ enum ENUM_EXTENSIBILITY_ATTR(open) BridgedMacroDefinitionKind : size_t {
|
||||
BridgedBuiltinExternalMacro,
|
||||
/// The builtin definition for the "isolation" macro.
|
||||
BridgedBuiltinIsolationMacro,
|
||||
/// The builtin definition for the "SwiftSetting" macro.
|
||||
BridgedBuiltinSwiftSettingsMacro,
|
||||
};
|
||||
|
||||
struct BridgedASTType {
|
||||
|
||||
@@ -8717,20 +8717,5 @@ ERROR(extensible_attr_on_internal_type,none,
|
||||
ERROR(pre_enum_extensibility_without_extensible,none,
|
||||
"%0 can only be used together with '@extensible' attribute", (DeclAttribute))
|
||||
|
||||
//===----------------------------------------------------------------------===//
|
||||
// MARK: SwiftSettings
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
ERROR(swift_settings_invalid_setting, none,
|
||||
"Unrecognized setting passed to #SwiftSettings", ())
|
||||
|
||||
ERROR(swift_settings_must_be_top_level, none,
|
||||
"#SwiftSettings can only be invoked as a top level declaration", ())
|
||||
|
||||
ERROR(swift_settings_duplicate_setting, none,
|
||||
"duplicate setting passed to #SwiftSettings", ())
|
||||
NOTE(swift_settings_duplicate_setting_original_loc, none,
|
||||
"setting originally passed here", ())
|
||||
|
||||
#define UNDEFINE_DIAGNOSTIC_MACROS
|
||||
#include "DefineDiagnosticMacros.h"
|
||||
|
||||
@@ -101,8 +101,6 @@ KNOWN_STDLIB_TYPE_DECL(Result, NominalTypeDecl, 2)
|
||||
|
||||
KNOWN_STDLIB_TYPE_DECL(InlineArray, NominalTypeDecl, 2)
|
||||
|
||||
KNOWN_STDLIB_TYPE_DECL(SwiftSetting, NominalTypeDecl, 0)
|
||||
|
||||
KNOWN_STDLIB_TYPE_DECL(MutableSpan, NominalTypeDecl, 1)
|
||||
|
||||
#undef KNOWN_STDLIB_TYPE_DECL
|
||||
|
||||
@@ -77,9 +77,6 @@ enum class BuiltinMacroKind : uint8_t {
|
||||
ExternalMacro,
|
||||
/// #isolation, which produces the isolation of the current context
|
||||
IsolationMacro,
|
||||
/// #SwiftSettings, which allows for the user to set a compiler setting at
|
||||
/// the file level
|
||||
SwiftSettingsMacro,
|
||||
};
|
||||
|
||||
/// A single replacement
|
||||
|
||||
@@ -54,15 +54,6 @@ enum class RestrictedImportKind {
|
||||
/// Import that limits the access level of imported entities.
|
||||
using ImportAccessLevel = std::optional<AttributedImport<ImportedModule>>;
|
||||
|
||||
/// Language options only for use with a specific SourceFile.
|
||||
///
|
||||
/// Vended by SourceFile::getLanguageOptions().
|
||||
struct SourceFileLangOptions {
|
||||
/// If unset, no value was provided. If a Type, that type is the type of the
|
||||
/// isolation. If set to an empty type, nil was specified explicitly.
|
||||
std::optional<Type> defaultIsolation;
|
||||
};
|
||||
|
||||
/// A file containing Swift source code.
|
||||
///
|
||||
/// This is a .swift or .sil file (or a virtual file, such as the contents of
|
||||
@@ -572,9 +563,6 @@ public:
|
||||
ObjCSelector selector,
|
||||
SmallVectorImpl<AbstractFunctionDecl *> &results) const override;
|
||||
|
||||
/// File level language options.
|
||||
SourceFileLangOptions getLanguageOptions() const;
|
||||
|
||||
protected:
|
||||
virtual void
|
||||
lookupOperatorDirect(Identifier name, OperatorFixity fixity,
|
||||
|
||||
@@ -5332,26 +5332,6 @@ public:
|
||||
void cacheResult(std::optional<SemanticAvailabilitySpec> value) const;
|
||||
};
|
||||
|
||||
class SourceFileLangOptionsRequest
|
||||
: public SimpleRequest<SourceFileLangOptionsRequest,
|
||||
SourceFileLangOptions(SourceFile *),
|
||||
RequestFlags::Cached> {
|
||||
|
||||
public:
|
||||
using SimpleRequest::SimpleRequest;
|
||||
|
||||
private:
|
||||
friend SimpleRequest;
|
||||
|
||||
SourceFileLangOptions evaluate(Evaluator &evaluator,
|
||||
SourceFile *sourceFile) const;
|
||||
|
||||
public:
|
||||
bool isCached() const { return true; }
|
||||
std::optional<SourceFileLangOptions> getCachedResult() const;
|
||||
void cacheResult(SourceFileLangOptions value) const;
|
||||
};
|
||||
|
||||
#define SWIFT_TYPEID_ZONE TypeChecker
|
||||
#define SWIFT_TYPEID_HEADER "swift/AST/TypeCheckerTypeIDZone.def"
|
||||
#include "swift/Basic/DefineTypeIDZone.h"
|
||||
|
||||
@@ -629,6 +629,3 @@ SWIFT_REQUEST(TypeChecker, SemanticAvailabilitySpecRequest,
|
||||
std::optional<SemanticAvailabilitySpec>
|
||||
(const AvailabilitySpec *, const DeclContext *),
|
||||
SeparatelyCached, NoLocationInfo)
|
||||
|
||||
SWIFT_REQUEST(TypeChecker, SourceFileLangOptionsRequest,
|
||||
SourceFileLangOptions (SourceFile *), Cached, NoLocationInfo)
|
||||
|
||||
@@ -489,9 +489,6 @@ SUPPRESSIBLE_EXPERIMENTAL_FEATURE(ABIAttribute, true)
|
||||
/// Allow custom availability domains to be defined and referenced.
|
||||
EXPERIMENTAL_FEATURE(CustomAvailability, true)
|
||||
|
||||
/// Allow SwiftSettings
|
||||
EXPERIMENTAL_FEATURE(SwiftSettings, false)
|
||||
|
||||
/// Syntax sugar features for concurrency.
|
||||
EXPERIMENTAL_FEATURE(ConcurrencySyntaxSugar, true)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user