mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2026-01-31 01:35:20 +01:00
[clang] Don't crash when loading invalid VFS for the module dep collector
The VFS is null when it's invalid so return early in collectVFSFromYAML.
This commit is contained in:
@@ -2127,6 +2127,8 @@ void vfs::collectVFSFromYAML(std::unique_ptr<MemoryBuffer> Buffer,
|
||||
std::unique_ptr<RedirectingFileSystem> VFS = RedirectingFileSystem::create(
|
||||
std::move(Buffer), DiagHandler, YAMLFilePath, DiagContext,
|
||||
std::move(ExternalFS));
|
||||
if (!VFS)
|
||||
return;
|
||||
ErrorOr<RedirectingFileSystem::LookupResult> RootResult =
|
||||
VFS->lookupPath("/");
|
||||
if (!RootResult)
|
||||
|
||||
Reference in New Issue
Block a user