Index: llvm/lib/Support/VirtualFileSystem.cpp =================================================================== --- llvm/lib/Support/VirtualFileSystem.cpp +++ llvm/lib/Support/VirtualFileSystem.cpp @@ -753,6 +753,7 @@ if (HardLinkTarget) Child.reset(new detail::InMemoryHardLink(P.str(), *HardLinkTarget)); else { + assert(Buffer && "Non-HardLink without a buffer?"); // Create a new file or directory. Status Stat(P.str(), getNextVirtualUniqueID(), llvm::sys::toTimePoint(ModificationTime), ResolvedUser, @@ -791,6 +792,7 @@ if (I != E) return false; + assert(Buffer); // Return false only if the new file is different from the existing one. if (auto Link = dyn_cast(Node)) { return Link->getResolvedFile().getBuffer()->getBuffer() ==