浏览代码

NFCI, optimize layout of FileEntry

The reordering of the UID field makes the size of a
FileEntry 8 bytes smaller on 64bit platforms.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@367371 91177308-0d34-0410-b5e6-96231b3b80d8
Alex Lorenz 6 年之前
父节点
当前提交
321bac621e
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      include/clang/Basic/FileManager.h

+ 1 - 1
include/clang/Basic/FileManager.h

@@ -64,8 +64,8 @@ class FileEntry {
   off_t Size;                 // File size in bytes.
   off_t Size;                 // File size in bytes.
   time_t ModTime;             // Modification time of file.
   time_t ModTime;             // Modification time of file.
   const DirectoryEntry *Dir;  // Directory file lives in.
   const DirectoryEntry *Dir;  // Directory file lives in.
-  unsigned UID;               // A unique (small) ID for the file.
   llvm::sys::fs::UniqueID UniqueID;
   llvm::sys::fs::UniqueID UniqueID;
+  unsigned UID;               // A unique (small) ID for the file.
   bool IsNamedPipe;
   bool IsNamedPipe;
   bool IsValid;               // Is this \c FileEntry initialized and valid?
   bool IsValid;               // Is this \c FileEntry initialized and valid?