LLVM
8.0.1
|
Represents an open file. More...
#include "llvm/Support/VirtualFileSystem.h"
Public Member Functions | |
virtual | ~File () |
Destroy the file after closing it (if open). More... | |
virtual llvm::ErrorOr< Status > | status ()=0 |
Get the status of the file. More... | |
virtual llvm::ErrorOr< std::string > | getName () |
Get the name of the file. More... | |
virtual llvm::ErrorOr< std::unique_ptr< llvm::MemoryBuffer > > | getBuffer (const Twine &Name, int64_t FileSize=-1, bool RequiresNullTerminator=true, bool IsVolatile=false)=0 |
Get the contents of the file as a MemoryBuffer . More... | |
virtual std::error_code | close ()=0 |
Closes the file. More... | |
Represents an open file.
Definition at line 99 of file VirtualFileSystem.h.
|
virtualdefault |
Destroy the file after closing it (if open).
Sub-classes should generally call close() inside their destructors. We cannot do that from the base class, since close is virtual.
Referenced by llvm::vfs::Status::exists().
|
pure virtual |
Closes the file.
|
pure virtual |
Get the contents of the file as a MemoryBuffer
.
|
inlinevirtual |
Get the name of the file.
Definition at line 110 of file VirtualFileSystem.h.
References llvm::vfs::Status::getName(), llvm::AMDGPU::HSAMD::Kernel::Arg::Key::IsVolatile, llvm::sys::fs::status(), and llvm::StringRef::str().
|
pure virtual |
Get the status of the file.