]> granicus.if.org Git - clang/commitdiff
NFCI, optimize layout of FileEntry
authorAlex Lorenz <arphaman@gmail.com>
Wed, 31 Jul 2019 00:12:00 +0000 (00:12 +0000)
committerAlex Lorenz <arphaman@gmail.com>
Wed, 31 Jul 2019 00:12:00 +0000 (00:12 +0000)
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

include/clang/Basic/FileManager.h

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