Lines Matching defs:FileEntry

1 //===- clang/Basic/FileEntry.h - File references ----------------*- C++ -*-===//
10 /// Defines interfaces for clang::FileEntry and clang::FileEntryRef.
53 class FileEntry;
55 /// A reference to a \c FileEntry that includes the name of the file as it was
59 /// The name of this FileEntry. If a VFS uses 'use-external-name', this is
63 /// The name of this FileEntry, as originally requested without applying any
70 const FileEntry &getFileEntry() const {
71 return *cast<FileEntry *>(getBaseMapEntry().second->V);
87 /// Check if the underlying FileEntry is the same, intentially ignoring
92 friend bool operator==(const FileEntry *LHS, const FileEntryRef &RHS) {
95 friend bool operator==(const FileEntryRef &LHS, const FileEntry *RHS) {
101 friend bool operator!=(const FileEntry *LHS, const FileEntryRef &RHS) {
104 friend bool operator!=(const FileEntryRef &LHS, const FileEntry *RHS) {
108 /// Hash code is based on the FileEntry, not the specific named reference,
126 llvm::PointerUnion<FileEntry *, const MapEntry *> V;
132 MapValue(FileEntry &FE, DirectoryEntryRef Dir) : V(&FE), Dir(Dir) {}
139 /// Allow FileEntryRef to degrade into 'const FileEntry*' to facilitate
154 /// FIXME: Once FileEntryRef is "everywhere" and FileEntry::LastRef and
155 /// FileEntry::getName have been deleted, delete this implicit conversion.
156 operator const FileEntry *() const { return &getFileEntry(); }
201 static_assert(sizeof(FileEntryRef) == sizeof(const FileEntry *),
270 /// Support for finding `const FileEntry *` in a `DenseMap<FileEntryRef, T>`.
272 static unsigned getHashValue(const clang::FileEntry *Val) {
275 static bool isEqual(const clang::FileEntry *LHS, clang::FileEntryRef RHS) {
287 inline bool operator==(const FileEntry *LHS, const OptionalFileEntryRef &RHS) {
290 inline bool operator==(const OptionalFileEntryRef &LHS, const FileEntry *RHS) {
293 inline bool operator!=(const FileEntry *LHS, const OptionalFileEntryRef &RHS) {
296 inline bool operator!=(const OptionalFileEntryRef &LHS, const FileEntry *RHS) {
303 /// If the 'File' member is valid, then this FileEntry has an open file
305 class FileEntry {
308 FileEntry();
309 FileEntry(const FileEntry &) = delete;
310 FileEntry &operator=(const FileEntry &) = delete;
320 /// The open file, if it is owned by the \p FileEntry.
323 /// The file content, if it is owned by the \p FileEntry.
327 ~FileEntry();
364 cast<FileEntry *>(getBaseMapEntry().second->V)->setSize(BufferSize);