[SourceKit] Remove some dupliate computation of realpaths

This commit is contained in:
Alex Hoppen
2021-11-30 22:30:12 +01:00
parent 5f4b1a0b27
commit dcbedc65fd
3 changed files with 23 additions and 10 deletions

View File

@@ -156,7 +156,10 @@ public:
/// Looks up the document only by the path name that was given initially.
SwiftEditorDocumentRef getByUnresolvedName(StringRef FilePath);
/// Looks up the document by resolving symlinks in the paths.
SwiftEditorDocumentRef findByPath(StringRef FilePath);
/// If \p IsRealpath is \c true, then \p FilePath must already be
/// canonicalized to a realpath.
SwiftEditorDocumentRef findByPath(StringRef FilePath,
bool IsRealpath = false);
SwiftEditorDocumentRef remove(StringRef FilePath);
};