[VFS] Also drop '.' when adding files to an in-memory FS.
Otherwise we won't be able to find them later. llvm-svn: 249525
This commit is contained in:
@@ -495,6 +495,13 @@ void InMemoryFileSystem::addFile(const Twine &P, time_t ModificationTime,
|
||||
auto I = llvm::sys::path::begin(Path), E = llvm::sys::path::end(Path);
|
||||
while (true) {
|
||||
StringRef Name = *I;
|
||||
// Skip over ".".
|
||||
// FIXME: Also handle "..".
|
||||
if (Name == ".") {
|
||||
++I;
|
||||
continue;
|
||||
}
|
||||
|
||||
detail::InMemoryNode *Node = Dir->getChild(Name);
|
||||
++I;
|
||||
if (!Node) {
|
||||
|
||||
Reference in New Issue
Block a user