Skip to content

Commit 197875a

Browse files
committed
[Sema/SILGen] Track per-source-file "used" conformances to reference in SILGen
Sema was dutifully tracking conformances that were "used" as part of type checking, so it could make sure that those conformances got completed for SILGen to use. However, this information never actually made it to SILGen, which included its own (more conservative, not broad enough) heuristics for finding "used" conformances. Teach Sema to record conformances within the appropriate source file, and have SILGen reference the conformances when it emits SIL for the source file.
1 parent 55be501 commit 197875a

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

test/IDE/newtype.swift

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,10 @@
2525
// PRINT-NEXT: extension Foo {
2626
// PRINT-NEXT: static let err: ErrorDomain
2727
// PRINT-NEXT: }
28-
// PRINT-NEXT: struct ClosedEnum : RawRepresentable, _SwiftNewtypeWrapper {
29-
// PRINT-NEXT: init(rawValue: String?)
30-
// PRINT-NEXT: var _rawValue: NSString?
31-
// PRINT-NEXT: var rawValue: String? { get }
28+
// PRINT-NEXT: struct ClosedEnum : RawRepresentable, _SwiftNewtypeWrapper, Equatable, Hashable, Comparable, _ObjectiveCBridgeable {
29+
// PRINT-NEXT: init(rawValue: String)
30+
// PRINT-NEXT: var _rawValue: NSString
31+
// PRINT-NEXT: var rawValue: String { get }
3232
// PRINT-NEXT: }
3333
// PRINT-NEXT: extension ClosedEnum {
3434
// PRINT-NEXT: static let firstClosedEntryEnum: ClosedEnum

0 commit comments

Comments
 (0)