aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Support/VirtualFileSystem.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/Support/VirtualFileSystem.cpp')
-rw-r--r--llvm/lib/Support/VirtualFileSystem.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/llvm/lib/Support/VirtualFileSystem.cpp b/llvm/lib/Support/VirtualFileSystem.cpp
index 9d21eba..6d756f4 100644
--- a/llvm/lib/Support/VirtualFileSystem.cpp
+++ b/llvm/lib/Support/VirtualFileSystem.cpp
@@ -2780,7 +2780,7 @@ bool JSONWriter::containedIn(StringRef Parent, StringRef Path) {
StringRef JSONWriter::containedPart(StringRef Parent, StringRef Path) {
assert(!Parent.empty());
assert(containedIn(Parent, Path));
- return Path.slice(Parent.size() + 1, StringRef::npos);
+ return Path.substr(Parent.size() + 1);
}
void JSONWriter::startDirectory(StringRef Path) {
@@ -2846,7 +2846,7 @@ void JSONWriter::write(ArrayRef<YAMLVFSEntry> Entries,
if (UseOverlayRelative) {
assert(RPath.starts_with(OverlayDir) &&
"Overlay dir must be contained in RPath");
- RPath = RPath.slice(OverlayDir.size(), RPath.size());
+ RPath = RPath.substr(OverlayDir.size());
}
bool IsCurrentDirEmpty = true;
@@ -2879,7 +2879,7 @@ void JSONWriter::write(ArrayRef<YAMLVFSEntry> Entries,
if (UseOverlayRelative) {
assert(RPath.starts_with(OverlayDir) &&
"Overlay dir must be contained in RPath");
- RPath = RPath.slice(OverlayDir.size(), RPath.size());
+ RPath = RPath.substr(OverlayDir.size());
}
if (!Entry.IsDirectory) {
writeEntry(path::filename(Entry.VPath), RPath);