Add explicit OpenSourcesAsVolatile option

This commit is contained in:
Jeremy Day
2024-07-26 16:57:39 -07:00
parent a22419f1d0
commit 221c7039bd
5 changed files with 20 additions and 9 deletions

View File

@@ -699,7 +699,7 @@ unsigned SourceManager::getExternalSourceBufferID(StringRef Path) {
swift::vfs::getFileOrSTDIN(*getFileSystem(), Path,
/* FileSize */ -1,
/* RequiresNullTerminator */ true,
/* isVolatile */ this->EditorMode);
/* isVolatile */ this->OpenSourcesAsVolatile);
if (InputFileOrErr) {
// This assertion ensures we can look up from the map in the future when
// using the same Path.