Remove assert that path exists on file system

This would trigger when path prefixes are remapped, as the buffer
identifier is the remapped path, not the path on the file system. There
is no easy way to recover the original path, so drop the assert.
This commit is contained in:
Henrik G. Olsson
2025-10-17 15:39:05 -07:00
parent d69c021d25
commit acc967bf9d

View File

@@ -58,7 +58,6 @@ SourceLoc ClangSourceBufferImporter::resolveSourceLocation(
// different contents in different modules, despite the same name.
auto IDOpt = swiftSourceManager.getIDForBufferIdentifier(bufIdent);
if (IDOpt.has_value() && clangSrcMgr.getFileEntryForID(clangFileID)) {
CONDITIONAL_ASSERT(llvm::sys::fs::exists(bufIdent));
mirrorID = IDOpt.value();
} else
mirrorID = swiftSourceManager.addNewSourceBuffer(std::move(mirrorBuffer));