File tree Expand file tree Collapse file tree 2 files changed +10
-1
lines changed
SwiftCompilerSources/Sources/SIL Expand file tree Collapse file tree 2 files changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -363,7 +363,11 @@ public struct VarDecl {
363
363
guard let decl = bridged. raw else { return nil }
364
364
self . bridged = BridgedVarDecl ( raw: decl)
365
365
}
366
-
366
+
367
+ public var sourceLoc : SourceLoc ? {
368
+ return SourceLoc ( bridged: bridged. getSourceLocation ( ) )
369
+ }
370
+
367
371
public var userFacingName : String { String ( bridged. getUserFacingName ( ) ) }
368
372
}
369
373
Original file line number Diff line number Diff line change @@ -49,6 +49,11 @@ bool BridgedNominalTypeDecl_hasValueDeinit(BridgedNominalTypeDecl decl) {
49
49
// MARK: BridgedVarDecl
50
50
//===----------------------------------------------------------------------===//
51
51
52
+ BridgedSourceLoc BridgedVarDecl_getSourceLocation (BridgedVarDecl decl ) {
53
+ swift ::SourceLoc sourceLoc = decl .unbridged ()-> getNameLoc ();
54
+ return BridgedSourceLoc (sourceLoc .getOpaquePointerValue ());
55
+ }
56
+
52
57
BridgedStringRef BridgedVarDecl_getUserFacingName (BridgedVarDecl decl ) {
53
58
return decl .unbridged ()-> getBaseName ().userFacingName ();
54
59
}
You can’t perform that action at this time.
0 commit comments