aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/Basic/VirtualFileSystem.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang/lib/Basic/VirtualFileSystem.cpp')
-rw-r--r--clang/lib/Basic/VirtualFileSystem.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/clang/lib/Basic/VirtualFileSystem.cpp b/clang/lib/Basic/VirtualFileSystem.cpp
index b3805b2..b5bf33f 100644
--- a/clang/lib/Basic/VirtualFileSystem.cpp
+++ b/clang/lib/Basic/VirtualFileSystem.cpp
@@ -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) {