Skip to content

Commit c0a6159

Browse files
authored
Merge pull request #70427 from eeckstein/bridged-feature
SwiftCompilerSources: remove the redundant `BridgedPassContext.Feature` enum
2 parents 40ce4b0 + 773d6b1 commit c0a6159

File tree

3 files changed

+3
-9
lines changed

3 files changed

+3
-9
lines changed

SwiftCompilerSources/Sources/Optimizer/PassManager/Options.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ struct Options {
3232
_bridged.hasFeature(.Embedded)
3333
}
3434

35-
func hasFeature(_ feature: BridgedPassContext.Feature) -> Bool {
35+
func hasFeature(_ feature: BridgedFeature) -> Bool {
3636
_bridged.hasFeature(feature)
3737
}
3838

include/swift/SILOptimizer/OptimizerBridging.h

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -169,12 +169,6 @@ struct BridgedPassContext {
169169
Lowered
170170
};
171171

172-
/// Enumeration describing all of the named features.
173-
enum class Feature {
174-
#define LANGUAGE_FEATURE(FeatureName, SENumber, Description, Option) FeatureName,
175-
#include "swift/Basic/Features.def"
176-
};
177-
178172
SWIFT_IMPORT_UNSAFE BridgedOwnedString getModuleDescription() const;
179173
SWIFT_IMPORT_UNSAFE BRIDGED_INLINE BridgedChangeNotificationHandler asNotificationHandler() const;
180174
BRIDGED_INLINE SILStage getSILStage() const;
@@ -307,7 +301,7 @@ struct BridgedPassContext {
307301
};
308302

309303
BRIDGED_INLINE bool enableStackProtection() const;
310-
BRIDGED_INLINE bool hasFeature(Feature feature) const;
304+
BRIDGED_INLINE bool hasFeature(BridgedFeature feature) const;
311305
BRIDGED_INLINE bool enableMoveInoutStackProtection() const;
312306
BRIDGED_INLINE AssertConfiguration getAssertConfiguration() const;
313307
bool enableSimplificationFor(BridgedInstruction inst) const;

include/swift/SILOptimizer/OptimizerBridgingImpl.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -414,7 +414,7 @@ bool BridgedPassContext::enableStackProtection() const {
414414
return mod->getOptions().EnableStackProtection;
415415
}
416416

417-
bool BridgedPassContext::hasFeature(Feature feature) const {
417+
bool BridgedPassContext::hasFeature(BridgedFeature feature) const {
418418
swift::SILModule *mod = invocation->getPassManager()->getModule();
419419
return mod->getASTContext().LangOpts.hasFeature((swift::Feature)feature);
420420
}

0 commit comments

Comments
 (0)