if (Status || Status.getError() != errc::no_such_file_or_directory)
return Status;
}
- return error_code(errc::no_such_file_or_directory, system_category());
+ return make_error_code(errc::no_such_file_or_directory);
}
error_code OverlayFileSystem::openFileForRead(const llvm::Twine &Path,
if (!EC || EC != errc::no_such_file_or_directory)
return EC;
}
- return error_code(errc::no_such_file_or_directory, system_category());
+ return make_error_code(errc::no_such_file_or_directory);
}
//===-----------------------------------------------------------------------===/
return EC;
if (Path.empty())
- return error_code(errc::invalid_argument, system_category());
+ return make_error_code(errc::invalid_argument);
sys::path::const_iterator Start = sys::path::begin(Path);
sys::path::const_iterator End = sys::path::end(Path);
if (Result || Result.getError() != errc::no_such_file_or_directory)
return Result;
}
- return error_code(errc::no_such_file_or_directory, system_category());
+ return make_error_code(errc::no_such_file_or_directory);
}
ErrorOr<Entry *> VFSFromYAML::lookupPath(sys::path::const_iterator Start,
if (CaseSensitive ? !Start->equals(From->getName())
: !Start->equals_lower(From->getName()))
// failure to match
- return error_code(errc::no_such_file_or_directory, system_category());
+ return make_error_code(errc::no_such_file_or_directory);
++Start;
DirectoryEntry *DE = dyn_cast<DirectoryEntry>(From);
if (!DE)
- return error_code(errc::not_a_directory, system_category());
+ return make_error_code(errc::not_a_directory);
for (DirectoryEntry::iterator I = DE->contents_begin(),
E = DE->contents_end();
if (Result || Result.getError() != errc::no_such_file_or_directory)
return Result;
}
- return error_code(errc::no_such_file_or_directory, system_category());
+ return make_error_code(errc::no_such_file_or_directory);
}
ErrorOr<Status> VFSFromYAML::status(const Twine &Path) {
FileEntry *F = dyn_cast<FileEntry>(*E);
if (!F) // FIXME: errc::not_a_file?
- return error_code(errc::invalid_argument, system_category());
+ return make_error_code(errc::invalid_argument);
if (error_code EC = ExternalFS->openFileForRead(F->getExternalContentsPath(),
Result))