[PATCH] D23902: Minor cleanup of PTHWriter

Alexander Shaposhnikov via cfe-commits cfe-commits at lists.llvm.org
Thu Aug 25 19:03:14 PDT 2016


alexshap created this revision.
alexshap added reviewers: bogner, dblaikie, rnk.
alexshap added a subscriber: cfe-commits.
alexshap set the repository for this revision to rL LLVM.
alexshap changed the visibility of this Differential Revision from "Public (No Login Required)" to "All Users".

The class PTHWriter is in lib/Frontend/CacheTokens.cpp inside anonymous namespace.
This diff changes the order of fields an removes excessive padding.


Repository:
  rL LLVM

https://reviews.llvm.org/D23902

Files:
  lib/Frontend/CacheTokens.cpp

Index: lib/Frontend/CacheTokens.cpp
===================================================================
--- lib/Frontend/CacheTokens.cpp
+++ lib/Frontend/CacheTokens.cpp
@@ -182,14 +182,14 @@
   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);


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D23902.69311.patch
Type: text/x-patch
Size: 751 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20160826/b9d119ca/attachment.bin>


More information about the cfe-commits mailing list