summaryrefslogtreecommitdiffstats
path: root/contrib/llvm/tools/clang/include/clang/Basic/FileManager.h
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/llvm/tools/clang/include/clang/Basic/FileManager.h')
-rw-r--r--contrib/llvm/tools/clang/include/clang/Basic/FileManager.h17
1 files changed, 9 insertions, 8 deletions
diff --git a/contrib/llvm/tools/clang/include/clang/Basic/FileManager.h b/contrib/llvm/tools/clang/include/clang/Basic/FileManager.h
index ea8ed9f..5c7d9eb 100644
--- a/contrib/llvm/tools/clang/include/clang/Basic/FileManager.h
+++ b/contrib/llvm/tools/clang/include/clang/Basic/FileManager.h
@@ -39,7 +39,7 @@ namespace sys { class Path; }
namespace clang {
class FileManager;
class FileSystemStatCache;
-
+
/// DirectoryEntry - Cached information about one directory (either on
/// the disk or in the virtual file system).
///
@@ -64,12 +64,12 @@ class FileEntry {
dev_t Device; // ID for the device containing the file.
ino_t Inode; // Inode number for the file.
mode_t FileMode; // The file mode as returned by 'stat'.
-
+
/// FD - The file descriptor for the file entry if it is opened and owned
/// by the FileEntry. If not, this is set to -1.
mutable int FD;
friend class FileManager;
-
+
public:
FileEntry(dev_t device, ino_t inode, mode_t m)
: Name(0), Device(device), Inode(inode), FileMode(m), FD(-1) {}
@@ -80,7 +80,7 @@ public:
memcpy(this, &FE, sizeof(FE));
assert(FD == -1 && "Cannot copy a file-owning FileEntry");
}
-
+
void operator=(const FileEntry &FE) {
memcpy(this, &FE, sizeof(FE));
assert(FD == -1 && "Cannot assign a file-owning FileEntry");
@@ -110,13 +110,14 @@ public:
/// properties, such as uniquing files based on "inode", so that a file with two
/// names (e.g. symlinked) will be treated as a single file.
///
-class FileManager : public llvm::RefCountedBase<FileManager> {
+class FileManager : public RefCountedBase<FileManager> {
FileSystemOptions FileSystemOpts;
class UniqueDirContainer;
class UniqueFileContainer;
- /// UniqueRealDirs/UniqueRealFiles - Cache for existing real directories/files.
+ /// UniqueRealDirs/UniqueRealFiles - Cache for existing real
+ /// directories/files.
///
UniqueDirContainer &UniqueRealDirs;
UniqueFileContainer &UniqueRealFiles;
@@ -147,7 +148,7 @@ class FileManager : public llvm::RefCountedBase<FileManager> {
unsigned NumDirCacheMisses, NumFileCacheMisses;
// Caching.
- llvm::OwningPtr<FileSystemStatCache> StatCache;
+ OwningPtr<FileSystemStatCache> StatCache;
bool getStatValue(const char *Path, struct stat &StatBuf,
int *FileDescriptor);
@@ -224,7 +225,7 @@ public:
/// file to the corresponding FileEntry pointer.
void GetUniqueIDMapping(
SmallVectorImpl<const FileEntry *> &UIDToFiles) const;
-
+
void PrintStats() const;
};
OpenPOWER on IntegriCloud