File tree Expand file tree Collapse file tree 1 file changed +19
-17
lines changed
Sources/SwiftDriver/Utilities Expand file tree Collapse file tree 1 file changed +19
-17
lines changed Original file line number Diff line number Diff line change @@ -40,23 +40,7 @@ public enum VirtualPath: Hashable {
40
40
}
41
41
42
42
/// The name of the path for presentation purposes.
43
- ///
44
- /// FIXME: Maybe this should be debugDescription or description
45
- public var name : String {
46
- switch self {
47
- case . relative( let path) :
48
- return path. pathString
49
-
50
- case . absolute( let path) :
51
- return path. pathString
52
-
53
- case . standardInput, . standardOutput:
54
- return " - "
55
-
56
- case . temporary( let path) :
57
- return path. pathString
58
- }
59
- }
43
+ public var name : String { description }
60
44
61
45
/// The extension of this path, for relative or absolute paths.
62
46
public var `extension` : String ? {
@@ -147,6 +131,24 @@ extension VirtualPath: Codable {
147
131
}
148
132
}
149
133
134
+ extension VirtualPath : CustomStringConvertible {
135
+ public var description : String {
136
+ switch self {
137
+ case . relative( let path) :
138
+ return path. pathString
139
+
140
+ case . absolute( let path) :
141
+ return path. pathString
142
+
143
+ case . standardInput, . standardOutput:
144
+ return " - "
145
+
146
+ case . temporary( let path) :
147
+ return path. pathString
148
+ }
149
+ }
150
+ }
151
+
150
152
extension VirtualPath {
151
153
/// Replace the extension of the given path with a new one based on the
152
154
/// specified file type.
You can’t perform that action at this time.
0 commit comments