Lines Matching +refs:llvm +refs:mode
43 using namespace llvm;
57 llvm::Error FileSystem::Initialize(const FileSpec &mapping) { in Initialize()
60 llvm::ErrorOr<std::unique_ptr<llvm::MemoryBuffer>> buffer = in Initialize()
61 llvm::vfs::getRealFileSystem()->getBufferForFile(mapping.GetPath()); in Initialize()
64 return llvm::errorCodeToError(buffer.getError()); in Initialize()
66 InstanceImpl().emplace(llvm::vfs::getVFSFromYAML(std::move(buffer.get()), in Initialize()
70 return llvm::Error::success(); in Initialize()
103 llvm::ErrorOr<vfs::Status>
111 llvm::ErrorOr<vfs::Status> FileSystem::GetStatus(const Twine &path) const { in GetStatus()
262 Resolver.ResolveFullPath(llvm::StringRef(path.begin(), path.size()), in Resolve()
297 FileSystem::CreateDataBuffer(const llvm::Twine &path, uint64_t size, in CreateDataBuffer()
307 std::unique_ptr<llvm::WritableMemoryBuffer> buffer; in CreateDataBuffer()
310 llvm::WritableMemoryBuffer::getFile(*external_path, -1, is_volatile); in CreateDataBuffer()
315 auto buffer_or_error = llvm::WritableMemoryBuffer::getFileSlice( in CreateDataBuffer()
343 llvm::ErrorOr<std::string> error_or_path = in ResolveExecutableLocation()
344 llvm::sys::findProgramByName(filename_str); in ResolveExecutableLocation()
349 llvm::StringRef path = *error_or_path; in ResolveExecutableLocation()
350 llvm::StringRef parent = llvm::sys::path::parent_path(path); in ResolveExecutableLocation()
368 return llvm::sys::path::home_directory(path); in GetHomeDirectory()
380 int mode) { in OpenWithFS() argument
381 return const_cast<FileSystem &>(fs).Open(path, flags, mode); in OpenWithFS()
428 mode_t mode = 0; in GetOpenMode() local
430 mode |= S_IRUSR; in GetOpenMode()
432 mode |= S_IWUSR; in GetOpenMode()
434 mode |= S_IXUSR; in GetOpenMode()
436 mode |= S_IRGRP; in GetOpenMode()
438 mode |= S_IWGRP; in GetOpenMode()
440 mode |= S_IXGRP; in GetOpenMode()
442 mode |= S_IROTH; in GetOpenMode()
444 mode |= S_IWOTH; in GetOpenMode()
446 mode |= S_IXOTH; in GetOpenMode()
447 return mode; in GetOpenMode()
463 int descriptor = llvm::sys::RetryAfterSignal( in Open()
467 return llvm::errorCodeToError( in Open()
476 ErrorOr<std::string> FileSystem::GetExternalPath(const llvm::Twine &path) { in GetExternalPath()
484 if (E.getError() == llvm::errc::no_such_file_or_directory) { in GetExternalPath()
492 return make_error_code(llvm::errc::not_supported); in GetExternalPath()
505 void FileSystem::Collect(const llvm::Twine &file) { in Collect()
509 if (llvm::sys::fs::is_directory(file)) in Collect()