r202458 - Attempt to fix non-MSVC build
Reid Kleckner
reid at kleckner.net
Thu Feb 27 17:12:56 PST 2014
Author: rnk
Date: Thu Feb 27 19:12:55 2014
New Revision: 202458
URL: http://llvm.org/viewvc/llvm-project?rev=202458&view=rev
Log:
Attempt to fix non-MSVC build
Modified:
cfe/trunk/lib/AST/RecordLayoutBuilder.cpp
Modified: cfe/trunk/lib/AST/RecordLayoutBuilder.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/AST/RecordLayoutBuilder.cpp?rev=202458&r1=202457&r2=202458&view=diff
==============================================================================
--- cfe/trunk/lib/AST/RecordLayoutBuilder.cpp (original)
+++ cfe/trunk/lib/AST/RecordLayoutBuilder.cpp Thu Feb 27 19:12:55 2014
@@ -3070,6 +3070,16 @@ static void PrintIndentNoOffset(raw_ostr
OS.indent(IndentLevel * 2);
}
+namespace {
+struct BaseOffsetComparator {
+ const ASTRecordLayout &RL;
+ BaseOffsetComparator(const ASTRecordLayout &RL) : RL(RL) {}
+ bool operator()(const CXXRecordDecl *L, const CXXRecordDecl *R) const {
+ return RL.getBaseClassOffset(L) < RL.getBaseClassOffset(R);
+ }
+};
+}
+
static void DumpCXXRecordLayout(raw_ostream &OS,
const CXXRecordDecl *RD, const ASTContext &C,
CharUnits Offset,
@@ -3114,13 +3124,6 @@ static void DumpCXXRecordLayout(raw_ostr
}
// Sort nvbases by offset.
- struct BaseOffsetComparator {
- const ASTRecordLayout &RL;
- BaseOffsetComparator(const ASTRecordLayout &RL) : RL(RL) {}
- bool operator()(const CXXRecordDecl *L, const CXXRecordDecl *R) const {
- return RL.getBaseClassOffset(L) < RL.getBaseClassOffset(R);
- }
- };
BaseOffsetComparator Cmp(Layout);
std::stable_sort(Bases.begin(), Bases.end(), Cmp);
More information about the cfe-commits
mailing list