LLVM 22.0.0git
OnDiskCommon.h File Reference
#include "llvm/Support/Error.h"
#include "llvm/Support/FileSystem.h"
#include <chrono>

Go to the source code of this file.

Namespaces

namespace  llvm
 This is an optimization pass for GlobalISel generic memory operations.
namespace  llvm::cas
namespace  llvm::cas::ondisk

Functions

std::error_code llvm::cas::ondisk::lockFileThreadSafe (int FD, llvm::sys::fs::LockKind Kind)
 Thread-safe alternative to sys::fs::lockFile.
std::error_code llvm::cas::ondisk::unlockFileThreadSafe (int FD)
 Thread-safe alternative to sys::fs::unlockFile.
std::error_code llvm::cas::ondisk::tryLockFileThreadSafe (int FD, std::chrono::milliseconds Timeout=std::chrono::milliseconds(0), llvm::sys::fs::LockKind Kind=llvm::sys::fs::LockKind::Exclusive)
 Thread-safe alternative to sys::fs::tryLockFile.
Expected< size_t > llvm::cas::ondisk::preallocateFileTail (int FD, size_t CurrentSize, size_t NewSize)
 Allocate space for the file FD on disk, if the filesystem supports it.