summaryrefslogtreecommitdiffstats
path: root/clang/lib/AST/RecordLayoutBuilder.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang/lib/AST/RecordLayoutBuilder.cpp')
-rw-r--r--clang/lib/AST/RecordLayoutBuilder.cpp20
1 files changed, 11 insertions, 9 deletions
diff --git a/clang/lib/AST/RecordLayoutBuilder.cpp b/clang/lib/AST/RecordLayoutBuilder.cpp
index 9444be301b3..35f6d9957e9 100644
--- a/clang/lib/AST/RecordLayoutBuilder.cpp
+++ b/clang/lib/AST/RecordLayoutBuilder.cpp
@@ -1603,15 +1603,17 @@ RecordLayoutBuilder::Diag(SourceLocation Loc, unsigned DiagID) {
FullSourceLoc(Loc, Context.getSourceManager()), DiagID);
}
-// This class implements layout specific to the Microsoft ABI.
-class MSRecordLayoutBuilder: public RecordLayoutBuilder {
-public:
- MSRecordLayoutBuilder(ASTContext& Ctx, EmptySubobjectMap *EmptySubobjects):
- RecordLayoutBuilder(Ctx, EmptySubobjects) {}
-
- virtual bool IsNearlyEmpty(const CXXRecordDecl *RD) const;
- virtual uint64_t GetVirtualPointersSize(const CXXRecordDecl *RD) const;
-};
+namespace {
+ // This class implements layout specific to the Microsoft ABI.
+ class MSRecordLayoutBuilder : public RecordLayoutBuilder {
+ public:
+ MSRecordLayoutBuilder(ASTContext& Ctx, EmptySubobjectMap *EmptySubobjects) :
+ RecordLayoutBuilder(Ctx, EmptySubobjects) {}
+
+ virtual bool IsNearlyEmpty(const CXXRecordDecl *RD) const;
+ virtual uint64_t GetVirtualPointersSize(const CXXRecordDecl *RD) const;
+ };
+}
bool MSRecordLayoutBuilder::IsNearlyEmpty(const CXXRecordDecl *RD) const {
// FIXME: Audit the corners
OpenPOWER on IntegriCloud