File tree Expand file tree Collapse file tree 1 file changed +4
-11
lines changed
Sources/SwiftDriver/Utilities Expand file tree Collapse file tree 1 file changed +4
-11
lines changed Original file line number Diff line number Diff line change @@ -365,17 +365,10 @@ extension VirtualPath {
365
365
fileprivate func intern( virtualPath path: VirtualPath ) -> VirtualPath . Handle {
366
366
return self . queue. sync ( flags: . barrier) {
367
367
guard let idx = self . uniquer [ path. cacheKey] else {
368
- if let existing = self . uniquer [ path. cacheKey] {
369
- // If there's an entry for the canonical path for this key, we just
370
- // need to vend its handle.
371
- return existing
372
- } else {
373
- // Otherwise we need to add an entry for the key.
374
- let nextSlot = self . table. count
375
- self . uniquer [ path. cacheKey] = . init( nextSlot)
376
- self . table. append ( path)
377
- return . init( nextSlot)
378
- }
368
+ let nextSlot = self . table. count
369
+ self . uniquer [ path. cacheKey] = . init( nextSlot)
370
+ self . table. append ( path)
371
+ return . init( nextSlot)
379
372
}
380
373
assert ( idx. core >= 0 , " Produced invalid index \( idx) for path \( path) " )
381
374
return idx
You can’t perform that action at this time.
0 commit comments