r282318 - Remove excessive padding from ObjCCategoriesVisitor
Alexander Shaposhnikov via cfe-commits
cfe-commits at lists.llvm.org
Fri Sep 23 19:07:19 PDT 2016
Author: alexshap
Date: Fri Sep 23 21:07:19 2016
New Revision: 282318
URL: http://llvm.org/viewvc/llvm-project?rev=282318&view=rev
Log:
Remove excessive padding from ObjCCategoriesVisitor
This diff reorders the fields of ObjCCategoriesVisitor
to remove excessive padding.
Test plan: make -j8 check-clang
Differential revision: https://reviews.llvm.org/D24753
Modified:
cfe/trunk/lib/Serialization/ASTReaderDecl.cpp
Modified: cfe/trunk/lib/Serialization/ASTReaderDecl.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Serialization/ASTReaderDecl.cpp?rev=282318&r1=282317&r2=282318&view=diff
==============================================================================
--- cfe/trunk/lib/Serialization/ASTReaderDecl.cpp (original)
+++ cfe/trunk/lib/Serialization/ASTReaderDecl.cpp Fri Sep 23 21:07:19 2016
@@ -3615,12 +3615,12 @@ namespace {
/// interface all the categories for it.
class ObjCCategoriesVisitor {
ASTReader &Reader;
- serialization::GlobalDeclID InterfaceID;
ObjCInterfaceDecl *Interface;
llvm::SmallPtrSetImpl<ObjCCategoryDecl *> &Deserialized;
- unsigned PreviousGeneration;
ObjCCategoryDecl *Tail;
llvm::DenseMap<DeclarationName, ObjCCategoryDecl *> NameCategoryMap;
+ serialization::GlobalDeclID InterfaceID;
+ unsigned PreviousGeneration;
void add(ObjCCategoryDecl *Cat) {
// Only process each category once.
@@ -3663,13 +3663,13 @@ namespace {
public:
ObjCCategoriesVisitor(ASTReader &Reader,
- serialization::GlobalDeclID InterfaceID,
ObjCInterfaceDecl *Interface,
- llvm::SmallPtrSetImpl<ObjCCategoryDecl *> &Deserialized,
+ llvm::SmallPtrSetImpl<ObjCCategoryDecl *> &Deserialized,
+ serialization::GlobalDeclID InterfaceID,
unsigned PreviousGeneration)
- : Reader(Reader), InterfaceID(InterfaceID), Interface(Interface),
- Deserialized(Deserialized), PreviousGeneration(PreviousGeneration),
- Tail(nullptr)
+ : Reader(Reader), Interface(Interface), Deserialized(Deserialized),
+ Tail(nullptr), InterfaceID(InterfaceID),
+ PreviousGeneration(PreviousGeneration)
{
// Populate the name -> category map with the set of known categories.
for (auto *Cat : Interface->known_categories()) {
@@ -3724,7 +3724,7 @@ namespace {
void ASTReader::loadObjCCategories(serialization::GlobalDeclID ID,
ObjCInterfaceDecl *D,
unsigned PreviousGeneration) {
- ObjCCategoriesVisitor Visitor(*this, ID, D, CategoriesDeserialized,
+ ObjCCategoriesVisitor Visitor(*this, D, CategoriesDeserialized, ID,
PreviousGeneration);
ModuleMgr.visit(Visitor);
}
More information about the cfe-commits
mailing list