Skip to content

Commit 2cc91d0

Browse files
committed
Temporarily reinstate LangOptions::EnableBareSlashRegexLiterals for LLDB
1 parent 3cf576d commit 2cc91d0

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

include/swift/Basic/LangOptions.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -354,6 +354,9 @@ namespace swift {
354354
/// The set of features that have been enabled.
355355
llvm::SmallSet<Feature, 2> Features;
356356

357+
/// Temporary flag to support LLDB's transition to using \c Features.
358+
bool EnableBareSlashRegexLiterals = false;
359+
357360
/// Use Clang function types for computing canonical types.
358361
/// If this option is false, the clang function types will still be computed
359362
/// but will not be used for checking type equality.

lib/Basic/LangOptions.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -229,6 +229,10 @@ bool LangOptions::hasFeature(Feature feature) const {
229229
if (Features.contains(feature))
230230
return true;
231231

232+
if (feature == Feature::BareSlashRegexLiterals &&
233+
EnableBareSlashRegexLiterals)
234+
return true;
235+
232236
if (auto version = getFeatureLanguageVersion(feature))
233237
return isSwiftVersionAtLeast(*version);
234238

0 commit comments

Comments
 (0)