clang 22.0.0git
|
A reference to a FileEntry
that includes the name of the file as it was accessed by the FileManager's client.
More...
#include "clang/Basic/FileEntry.h"
Classes | |
struct | MapValue |
Type stored in the StringMap. More... |
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 |
bool | isDeviceFile () 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
that includes the name of the file as it was accessed by the FileManager's client.
Definition at line 57 of file FileEntry.h.
using clang::FileEntryRef::MapEntry = llvm::StringMapEntry<llvm::ErrorOr<MapValue>> |
Type used in the StringMap.
Definition at line 118 of file FileEntry.h.
|
delete |
Referenced by hash_value, isSameRef(), operator!=, operator!=, operator!=, operator==, operator==, and operator==.
|
inlineexplicit |
Definition at line 160 of file FileEntry.h.
|
inline |
Definition at line 367 of file FileEntry.h.
References clang::FileEntry::closeFile(), and getFileEntry().
Referenced by clang::serialization::ModuleManager::addModule().
|
inline |
Retrieve the base MapEntry after redirects.
Definition at line 170 of file FileEntry.h.
Referenced by FileMgr::MapEntryOptionalStorage< FileEntryRef >, getFileEntry(), getName(), and updateFileEntryBufferSize().
|
inline |
Definition at line 78 of file FileEntry.h.
Referenced by clang::FileManager::getBypassFile(), clang::ModuleMap::isHeaderUnavailableInModule(), clang::Preprocessor::LookupFile(), and clang::ModuleMap::setUmbrellaHeaderAsWritten().
|
inline |
Definition at line 70 of file FileEntry.h.
References clang::cast(), and getBaseMapEntry().
Referenced by closeFile(), clang::FileManager::getBufferForFile(), clang::FileManager::getBypassFile(), getFileName(), getModificationTime(), getSize(), getUID(), getUniqueID(), hash_value, isDeviceFile(), isNamedPipe(), clang::Preprocessor::LookupFile(), operator const FileEntry *(), operator==, operator==, operator==, clang::operator==(), clang::operator==(), clang::SourceManager::translateFile(), and clang::VerifyDiagnosticConsumer::UpdateParsedFileStatus().
|
inline |
Expose the underlying MapEntry to simplify packing in a PointerIntPair or PointerUnion and allow construction in Optional.
Definition at line 167 of file FileEntry.h.
|
inline |
Definition at line 358 of file FileEntry.h.
References getFileEntry(), and clang::FileEntry::getModificationTime().
Referenced by clang::serialization::reader::HeaderFileInfoTrait::GetInternalKey(), and clang::Preprocessor::HandlePragmaDependency().
|
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.
References getBaseMapEntry().
Referenced by clang::ModuleMap::addHeader(), clang::tooling::AtomicChange::AtomicChange(), clang::FrontendAction::BeginSourceFile(), checkMSVCHeaderSearch(), clang::CompilerInstance::cloneForModuleCompile(), compareCrossTUSourceLocs(), clang::SourceManager::createFileID(), diagnoseFrameworkInclude(), clang::sema::SemaPPCallbacks::FileChanged(), clang::FileManager::getBufferForFile(), 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(), printLoc(), clang::index::SerializablePathCollection::tryStoreFilePath(), and clang::FixItRewriter::WriteFixedFiles().
|
inline |
The name of this FileEntry, as originally requested without applying any remappings for VFS 'use-external-name'.
FIXME: this should be the semantics of getName(). See comment in FileManager::getFileRef().
Definition at line 68 of file FileEntry.h.
Referenced by clang::CompilerInstance::cloneForModuleCompile().
|
inline |
Definition at line 350 of file FileEntry.h.
References getFileEntry(), and clang::FileEntry::getSize().
Referenced by clang::HeaderMap::Create(), clang::serialization::reader::HeaderFileInfoTrait::GetInternalKey(), InitializeFileRemapping(), and clang::SourceManager::overrideFileContents().
|
inline |
Definition at line 352 of file FileEntry.h.
References getFileEntry(), and clang::FileEntry::getUID().
Referenced by clang::HeaderSearch::getExistingFileInfo(), clang::HeaderSearch::getExistingLocalFileInfo(), clang::HeaderSearch::getFileInfo(), and clang::FileManager::GetUniqueIDMapping().
|
inline |
Definition at line 354 of file FileEntry.h.
References getFileEntry(), and clang::FileEntry::getUniqueID().
|
inline |
Definition at line 363 of file FileEntry.h.
References getFileEntry(), and clang::FileEntry::isDeviceFile().
|
inline |
Definition at line 362 of file FileEntry.h.
References getFileEntry(), and clang::FileEntry::isNamedPipe().
Referenced by clang::SourceManager::createFileID().
|
inline |
Check if RHS referenced the file in exactly the same way.
Definition at line 138 of file FileEntry.h.
References FileEntryRef().
Referenced by llvm::DenseMapInfo< clang::FileEntryRef >::isEqual().
|
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:
FIXME: Once FileEntryRef is "everywhere" and FileEntry::LastRef and FileEntry::getName have been deleted, delete this implicit conversion.
Definition at line 157 of file FileEntry.h.
References getFileEntry().
|
inline |
Definition at line 369 of file FileEntry.h.
References clang::cast(), and getBaseMapEntry().
|
friend |
Definition at line 170 of file FileEntry.h.
References getBaseMapEntry(), and Next.
|
friend |
Hash code is based on the FileEntry, not the specific named reference, just like operator==.
Definition at line 111 of file FileEntry.h.
References FileEntryRef(), getFileEntry(), and llvm::hash_value().
|
friend |
Definition at line 183 of file FileEntry.h.
|
friend |
Definition at line 102 of file FileEntry.h.
References FileEntryRef().
|
friend |
Definition at line 105 of file FileEntry.h.
References FileEntryRef().
|
friend |
Definition at line 99 of file FileEntry.h.
References FileEntryRef().
|
friend |
Definition at line 93 of file FileEntry.h.
References FileEntryRef(), and getFileEntry().
|
friend |
Definition at line 96 of file FileEntry.h.
References FileEntryRef(), and getFileEntry().
|
friend |
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 90 of file FileEntry.h.
References FileEntryRef(), and getFileEntry().