r367371 - NFCI, optimize layout of FileEntry

Alex Lorenz via cfe-commits cfe-commits at lists.llvm.org
Tue Jul 30 17:12:00 PDT 2019


Author: arphaman
Date: Tue Jul 30 17:12:00 2019
New Revision: 367371

URL: http://llvm.org/viewvc/llvm-project?rev=367371&view=rev
Log:
NFCI, optimize layout of FileEntry

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

Modified:
    cfe/trunk/include/clang/Basic/FileManager.h

Modified: cfe/trunk/include/clang/Basic/FileManager.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Basic/FileManager.h?rev=367371&r1=367370&r2=367371&view=diff
==============================================================================
--- cfe/trunk/include/clang/Basic/FileManager.h (original)
+++ cfe/trunk/include/clang/Basic/FileManager.h Tue Jul 30 17:12:00 2019
@@ -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?
 




More information about the cfe-commits mailing list