Files
swift-mirror/test/ModuleInterface/noncopyable_generics_interface_extensions.swift
Steven Wu 8150fb001d [InterfaceFile] Improve flag extraction from interface file
Improve the version/flags extract from interface file by moving away
from using Regex and limiting the search to the beginning of the file.

Switch away from Regex will give 5-10% improvement in time and
instruction counts, and limiting the search lines can save a lot of time
if the swiftinterface is large. For example, the extract time for Swift
stdlib is 10x faster after the patch.

Current strategey for limiting the line to search is by only parsing the
first comment block.
2024-10-31 12:46:05 -07:00

32 lines
838 B
Swift

// RUN: %empty-directory(%t)
// RUN: split-file %s %t
// RUN: %target-swift-typecheck-module-from-interface(%t/bug.swiftinterface) -I %t
//--- bug.swiftinterface
// swift-interface-format-version: 1.0
// swift-compiler-version: Apple Swift version 6.0 effective-5.10 (swiftlang-6.0.0.4.52 clang-1600.0.21.1.3)
// swift-module-flags: -enable-objc-interop -enable-library-evolution -module-name bug
import Swift
import _Concurrency
import _StringProcessing
import _SwiftConcurrencyShims
#if compiler(>=5.3) && $NoncopyableGenerics
public enum Maybe<Wrapped> : ~Swift.Copyable where Wrapped : ~Copyable {
case just(Wrapped)
case none
}
#else
public enum Maybe<Wrapped> {
case just(Wrapped)
case none
}
#endif
#if compiler(>=5.3) && $NoncopyableGenerics
extension bug.Maybe : Swift.Copyable {
}
#else
extension bug.Maybe {
}
#endif