@@ -21,15 +21,15 @@ public struct SourceLoc {
2121 self . locationInFile = locationInFile
2222 }
2323
24- public init ? ( bridged: BridgedSourceLoc ) {
25- guard let locationInFile = bridged. pointer else {
24+ public init ? ( bridged: swift . SourceLoc ) {
25+ guard bridged. isValid ( ) else {
2626 return nil
2727 }
28- self . init ( locationInFile: locationInFile )
28+ self . locationInFile = bridged . getOpaquePointerValue ( ) . assumingMemoryBound ( to : UInt8 . self )
2929 }
3030
31- public var bridged : BridgedSourceLoc {
32- . init( pointer : locationInFile)
31+ public var bridged : swift . SourceLoc {
32+ . init( llvm . SMLoc . getFromPointer ( locationInFile) )
3333 }
3434}
3535
@@ -40,8 +40,8 @@ extension SourceLoc {
4040}
4141
4242extension Optional where Wrapped == SourceLoc {
43- public var bridged : BridgedSourceLoc {
44- self ? . bridged ?? . init( pointer : nil )
43+ public var bridged : swift . SourceLoc {
44+ self ? . bridged ?? . init( )
4545 }
4646}
4747
@@ -68,6 +68,6 @@ public struct CharSourceRange {
6868
6969extension Optional where Wrapped == CharSourceRange {
7070 public var bridged : BridgedCharSourceRange {
71- self ? . bridged ?? . init( start: . init( pointer : nil ) , byteLength: 0 )
71+ self ? . bridged ?? . init( start: . init( ) , byteLength: 0 )
7272 }
7373}
0 commit comments