Skip to content

Commit af1da40

Browse files
committed
[Frontend] Removed dead case.
It is no longer possible to have no lexical markers. Remove the corresponding case.
1 parent ddccaa7 commit af1da40

File tree

3 files changed

+4
-8
lines changed

3 files changed

+4
-8
lines changed

include/swift/AST/SILOptions.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,6 @@
3131
namespace swift {
3232

3333
enum class LexicalLifetimesOption : uint8_t {
34-
// Do not insert lexical markers.
35-
Off = 0,
36-
3734
// Insert lexical markers via lexical borrow scopes and the lexical flag on
3835
// alloc_stacks produced from alloc_boxes, but strip them when lowering out of
3936
// Raw SIL.

include/swift/SIL/SILModule.h

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1075,10 +1075,9 @@ inline llvm::raw_ostream &operator<<(llvm::raw_ostream &OS, const SILModule &M){
10751075
inline bool SILOptions::supportsLexicalLifetimes(const SILModule &mod) const {
10761076
switch (mod.getStage()) {
10771077
case SILStage::Raw:
1078-
// In raw SIL, lexical markers are used for diagnostics. These markers are
1079-
// present as long as the lexical lifetimes feature is not disabled
1080-
// entirely.
1081-
return LexicalLifetimes != LexicalLifetimesOption::Off;
1078+
// In raw SIL, lexical markers are used for diagnostics and are always
1079+
// present.
1080+
return true;
10821081
case SILStage::Canonical:
10831082
case SILStage::Lowered:
10841083
// In Canonical SIL, lexical markers are used to ensure that object

lib/AST/ASTContext.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6532,5 +6532,5 @@ Type ASTContext::getNamedSwiftType(ModuleDecl *module, StringRef name) {
65326532

65336533
bool ASTContext::supportsMoveOnlyTypes() const {
65346534
// currently the only thing holding back whether the types can appear is this.
6535-
return SILOpts.LexicalLifetimes != LexicalLifetimesOption::Off;
6535+
return true;
65366536
}

0 commit comments

Comments
 (0)