clang: clang::FileEntryRef Class Reference (original) (raw)
A reference to a [FileEntry](classclang%5F1%5F1FileEntry.html "Cached information about one file (either on disk or in the virtual file system).")
that includes the name of the file as it was accessed by the FileManager's client. More...
#include "[clang/Basic/FileEntry.h](FileEntry%5F8h%5Fsource.html)"
Public Types | |
---|---|
using | MapEntry = llvm::StringMapEntry< llvm::ErrorOr< MapValue > > |
Type used in the StringMap. | |
Public Member Functions | |
---|---|
StringRef | getName () const |
The name of this FileEntry. | |
StringRef | getNameAsRequested () const |
The name of this FileEntry, as originally requested without applying any remappings for VFS 'use-external-name'. | |
const FileEntry & | getFileEntry () const |
void | updateFileEntryBufferSize (unsigned BufferSize) |
DirectoryEntryRef | getDir () const |
off_t | getSize () const |
unsigned | getUID () const |
const llvm::sys::fs::UniqueID & | getUniqueID () const |
time_t | getModificationTime () const |
bool | isNamedPipe () const |
void | closeFile () const |
bool | isSameRef (const FileEntryRef &RHS) const |
Check if RHS referenced the file in exactly the same way. | |
operator const FileEntry * () const | |
Allow FileEntryRef to degrade into 'const FileEntry*' to facilitate incremental adoption. | |
FileEntryRef ()=delete | |
FileEntryRef (const MapEntry &ME) | |
const clang::FileEntryRef::MapEntry & | getMapEntry () const |
Expose the underlying MapEntry to simplify packing in a PointerIntPair or PointerUnion and allow construction in Optional. | |
const MapEntry & | getBaseMapEntry () const |
Retrieve the base MapEntry after redirects. | |
Friends | |
---|---|
class | FileMgr::MapEntryOptionalStorage< FileEntryRef > |
struct | llvm::DenseMapInfo< FileEntryRef > |
bool | operator== (const FileEntryRef &LHS, const FileEntryRef &RHS) |
Check if the underlying FileEntry is the same, intentially ignoring whether the file was referenced with the same spelling of the filename. | |
bool | operator== (const FileEntry *LHS, const FileEntryRef &RHS) |
bool | operator== (const FileEntryRef &LHS, const FileEntry *RHS) |
bool | operator!= (const FileEntryRef &LHS, const FileEntryRef &RHS) |
bool | operator!= (const FileEntry *LHS, const FileEntryRef &RHS) |
bool | operator!= (const FileEntryRef &LHS, const FileEntry *RHS) |
llvm::hash_code | hash_value (FileEntryRef Ref) |
Hash code is based on the FileEntry, not the specific named reference, just like operator==. | |
A reference to a [FileEntry](classclang%5F1%5F1FileEntry.html "Cached information about one file (either on disk or in the virtual file system).")
that includes the name of the file as it was accessed by the FileManager's client.
Definition at line 57 of file FileEntry.h.
◆ MapEntry
clang::FileEntryRef::FileEntryRef ( ) | delete |
---|
◆ FileEntryRef() [2/2]
clang::FileEntryRef::FileEntryRef ( const MapEntry & ME) | inlineexplicit |
---|
◆ closeFile()
void clang::FileEntryRef::closeFile ( ) const | inline |
---|
◆ getBaseMapEntry()
const MapEntry & clang::FileEntryRef::getBaseMapEntry ( ) const | inline |
---|
◆ getDir()
◆ getFileEntry()
const FileEntry & clang::FileEntryRef::getFileEntry ( ) const | inline |
---|
Definition at line 70 of file FileEntry.h.
Referenced by closeFile(), clang::FileManager::getBufferForFile(), clang::FileManager::getBypassFile(), getFileName(), getModificationTime(), getSize(), clang::FileManager::getSTDIN(), getUID(), getUniqueID(), isNamedPipe(), clang::Preprocessor::LookupFile(), clang::operator==(), clang::SourceManager::translateFile(), and clang::VerifyDiagnosticConsumer::UpdateParsedFileStatus().
◆ getMapEntry()
Expose the underlying MapEntry to simplify packing in a PointerIntPair or PointerUnion and allow construction in Optional.
Definition at line 166 of file FileEntry.h.
◆ getModificationTime()
time_t clang::FileEntryRef::getModificationTime ( ) const | inline |
---|
◆ getName()
StringRef clang::FileEntryRef::getName ( ) const | inline |
---|
The name of this FileEntry.
If a VFS uses 'use-external-name', this is the redirected name. See getRequestedName().
Definition at line 61 of file FileEntry.h.
Referenced by clang::ModuleMap::addHeader(), applyEditsToTemp(), clang::arcmt::MigrationProcess::applyTransform(), clang::tooling::AtomicChange::AtomicChange(), clang::FrontendAction::BeginSourceFile(), checkMSVCHeaderSearch(), compareCrossTUSourceLocs(), compileModule(), clang::SourceManager::createFileID(), diagnoseFrameworkInclude(), clang::tooling::dependencies::ModuleDepCollectorPP::EndOfMainFile(), clang::sema::SemaPPCallbacks::FileChanged(), clang::arcmt::FileRemapper::flushToFile(), clang::FileManager::getBufferForFile(), clang::SrcMgr::ContentCache::getBufferOrNone(), clang::FileManager::getBypassFile(), getFileName(), clang::serialization::reader::HeaderFileInfoTrait::GetInternalKey(), clang::FileManager::GetUniqueIDMapping(), clang::ModuleMap::isHeaderUnavailableInModule(), clang::CodeGen::CodeGenModule::isInNoSanitizeList(), clang::HeaderSearch::LookupSubframeworkHeader(), clang::Rewriter::overwriteChangedFiles(), clang::arcmt::FileRemapper::overwriteOriginal(), printLoc(), clang::index::SerializablePathCollection::tryStoreFilePath(), and clang::FixItRewriter::WriteFixedFiles().
◆ getNameAsRequested()
StringRef clang::FileEntryRef::getNameAsRequested ( ) const | inline |
---|
◆ getSize()
off_t clang::FileEntryRef::getSize ( ) const | inline |
---|
◆ getUID()
unsigned clang::FileEntryRef::getUID ( ) const | inline |
---|
◆ getUniqueID()
const llvm::sys::fs::UniqueID & clang::FileEntryRef::getUniqueID ( ) const | inline |
---|
◆ isNamedPipe()
bool clang::FileEntryRef::isNamedPipe ( ) const | inline |
---|
◆ isSameRef()
◆ operator const FileEntry *()
clang::FileEntryRef::operator const FileEntry * ( ) const | inline |
---|
Allow FileEntryRef to degrade into 'const FileEntry*' to facilitate incremental adoption.
The goal is to avoid code churn due to dances like the following:
lvalue = rvalue;
lvalue = &rvalue.getFileEntry();
lvalue = rvalue;
FIXME: Once FileEntryRef is "everywhere" and FileEntry::LastRef and FileEntry::getName have been deleted, delete this implicit conversion.
Definition at line 156 of file FileEntry.h.
◆ updateFileEntryBufferSize()
void clang::FileEntryRef::updateFileEntryBufferSize ( unsigned BufferSize) | inline |
---|
◆ FileMgr::MapEntryOptionalStorage< FileEntryRef >
◆ hash_value
Hash code is based on the FileEntry, not the specific named reference, just like operator==.
Definition at line 110 of file FileEntry.h.
◆ llvm::DenseMapInfo< FileEntryRef >
◆ operator!= [1/3]
◆ operator!= [2/3]
◆ operator!= [3/3]
◆ operator== [1/3]
◆ operator== [2/3]
◆ operator== [3/3]
Check if the underlying FileEntry is the same, intentially ignoring whether the file was referenced with the same spelling of the filename.
Definition at line 89 of file FileEntry.h.
The documentation for this class was generated from the following file:
- include/clang/Basic/FileEntry.h