@@ -82,6 +82,7 @@ class FileEntryRef {
8282 inline const llvm::sys::fs::UniqueID &getUniqueID () const ;
8383 inline time_t getModificationTime () const ;
8484 inline bool isNamedPipe () const ;
85+ inline bool isDeviceFile () const ;
8586 inline void closeFile () const ;
8687
8788 // / Check if the underlying FileEntry is the same, intentially ignoring
@@ -316,6 +317,7 @@ class FileEntry {
316317 llvm::sys::fs::UniqueID UniqueID;
317318 unsigned UID = 0 ; // A unique (small) ID for the file.
318319 bool IsNamedPipe = false ;
320+ bool IsDeviceFile = false ;
319321
320322 // / The open file, if it is owned by the \p FileEntry.
321323 mutable std::unique_ptr<llvm::vfs::File> File;
@@ -340,6 +342,7 @@ class FileEntry {
340342 // / Check whether the file is a named pipe (and thus can't be opened by
341343 // / the native FileManager methods).
342344 bool isNamedPipe () const { return IsNamedPipe; }
345+ bool isDeviceFile () const { return IsDeviceFile; }
343346
344347 void closeFile () const ;
345348};
@@ -357,6 +360,9 @@ time_t FileEntryRef::getModificationTime() const {
357360}
358361
359362bool FileEntryRef::isNamedPipe () const { return getFileEntry ().isNamedPipe (); }
363+ bool FileEntryRef::isDeviceFile () const {
364+ return getFileEntry ().isDeviceFile ();
365+ }
360366
361367void FileEntryRef::closeFile () const { getFileEntry ().closeFile (); }
362368
0 commit comments