Remove excessive padding from PTHWriter
authorAlexander Shaposhnikov <shal1t712@gmail.com>
Tue, 13 Sep 2016 20:17:57 +0000 (20:17 +0000)
committerAlexander Shaposhnikov <shal1t712@gmail.com>
Tue, 13 Sep 2016 20:17:57 +0000 (20:17 +0000)
The class PTHWriter is in lib/Frontend/CacheTokens.cpp
inside the anonymous namespace.
This diff changes the order of fields an removes excessive padding.
Test plan: make -j8 check-clang

Differential revision: https://reviews.llvm.org/D23902

llvm-svn: 281385

clang/lib/Frontend/CacheTokens.cpp

index 1d24f12..d502e62 100644 (file)
@@ -182,14 +182,14 @@ class PTHWriter {
   typedef llvm::DenseMap<const IdentifierInfo*,uint32_t> IDMap;
   typedef llvm::StringMap<OffsetOpt, llvm::BumpPtrAllocator> CachedStrsTy;
 
-  IDMap IM;
   raw_pwrite_stream &Out;
   Preprocessor& PP;
-  uint32_t idcount;
+  IDMap IM;
+  std::vector<llvm::StringMapEntry<OffsetOpt>*> StrEntries;
   PTHMap PM;
   CachedStrsTy CachedStrs;
+  uint32_t idcount;
   Offset CurStrOffset;
-  std::vector<llvm::StringMapEntry<OffsetOpt>*> StrEntries;
 
   //// Get the persistent id for the given IdentifierInfo*.
   uint32_t ResolveID(const IdentifierInfo* II);