Remove excessive padding from PTHStatData (NFC)

This diff reorders the fields and removes excessive padding.
This fixes the following warning:

PTHLexer.cpp:629:7: warning: Excessive padding in 'class (anonymous namespace)::PTHStatData' (14 padding bytes, where 6 is optimal). Optimal fields order: Size, ModTime, UniqueID, HasData, IsDirectory, consider reordering the fields or adding explicit padding members.

Patch by: Alexander Shaposhnikov <shal1t712@gmail.com>

Differential Revision: https://reviews.llvm.org/D23826

llvm-svn: 279607
This commit is contained in:
Mehdi Amini 2016-08-24 04:26:57 +00:00
parent e81fcb81dc
commit 2862ba61c4
1 changed files with 2 additions and 2 deletions

View File

@ -628,15 +628,15 @@ PTHLexer *PTHManager::CreateLexer(FileID FID) {
namespace { namespace {
class PTHStatData { class PTHStatData {
public: public:
const bool HasData;
uint64_t Size; uint64_t Size;
time_t ModTime; time_t ModTime;
llvm::sys::fs::UniqueID UniqueID; llvm::sys::fs::UniqueID UniqueID;
const bool HasData;
bool IsDirectory; bool IsDirectory;
PTHStatData(uint64_t Size, time_t ModTime, llvm::sys::fs::UniqueID UniqueID, PTHStatData(uint64_t Size, time_t ModTime, llvm::sys::fs::UniqueID UniqueID,
bool IsDirectory) bool IsDirectory)
: HasData(true), Size(Size), ModTime(ModTime), UniqueID(UniqueID), : Size(Size), ModTime(ModTime), UniqueID(UniqueID), HasData(true),
IsDirectory(IsDirectory) {} IsDirectory(IsDirectory) {}
PTHStatData() : HasData(false) {} PTHStatData() : HasData(false) {}