[PATCH] D24754: [cleanup] Remove excessive padding from RedeclarableResult
Alexander Shaposhnikov via cfe-commits
cfe-commits at lists.llvm.org
Fri Sep 23 21:30:50 PDT 2016
This revision was automatically updated to reflect the committed changes.
Closed by commit rL282322: Remove excessive padding from RedeclarableResult (authored by alexshap).
Changed prior to commit:
https://reviews.llvm.org/D24754?vs=71903&id=72388#toc
Repository:
rL LLVM
https://reviews.llvm.org/D24754
Files:
cfe/trunk/lib/Serialization/ASTReaderDecl.cpp
Index: cfe/trunk/lib/Serialization/ASTReaderDecl.cpp
===================================================================
--- cfe/trunk/lib/Serialization/ASTReaderDecl.cpp
+++ cfe/trunk/lib/Serialization/ASTReaderDecl.cpp
@@ -146,13 +146,13 @@
/// Results from loading a RedeclarableDecl.
class RedeclarableResult {
- GlobalDeclID FirstID;
Decl *MergeWith;
+ GlobalDeclID FirstID;
bool IsKeyDecl;
public:
- RedeclarableResult(GlobalDeclID FirstID, Decl *MergeWith, bool IsKeyDecl)
- : FirstID(FirstID), MergeWith(MergeWith), IsKeyDecl(IsKeyDecl) {}
+ RedeclarableResult(Decl *MergeWith, GlobalDeclID FirstID, bool IsKeyDecl)
+ : MergeWith(MergeWith), FirstID(FirstID), IsKeyDecl(IsKeyDecl) {}
/// \brief Retrieve the first ID.
GlobalDeclID getFirstID() const { return FirstID; }
@@ -2311,7 +2311,7 @@
if (IsFirstLocalDecl)
Reader.PendingDeclChains.push_back(std::make_pair(DAsT, RedeclOffset));
- return RedeclarableResult(FirstDeclID, MergeWith, IsKeyDecl);
+ return RedeclarableResult(MergeWith, FirstDeclID, IsKeyDecl);
}
/// \brief Attempts to merge the given declaration (D) with another declaration
@@ -2353,9 +2353,10 @@
DeclID DsID, bool IsKeyDecl) {
auto *DPattern = D->getTemplatedDecl();
auto *ExistingPattern = Existing->getTemplatedDecl();
- RedeclarableResult Result(DPattern->getCanonicalDecl()->getGlobalID(),
- /*MergeWith*/ ExistingPattern, IsKeyDecl);
-
+ RedeclarableResult Result(/*MergeWith*/ ExistingPattern,
+ DPattern->getCanonicalDecl()->getGlobalID(),
+ IsKeyDecl);
+
if (auto *DClass = dyn_cast<CXXRecordDecl>(DPattern)) {
// Merge with any existing definition.
// FIXME: This is duplicated in several places. Refactor.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D24754.72388.patch
Type: text/x-patch
Size: 1897 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20160924/1afbe2b7/attachment.bin>
More information about the cfe-commits
mailing list