[cfe-commits] r105002 - /cfe/trunk/lib/AST/RecordLayoutBuilder.cpp
Anders Carlsson
andersca at mac.com
Fri May 28 14:13:31 PDT 2010
Author: andersca
Date: Fri May 28 16:13:31 2010
New Revision: 105002
URL: http://llvm.org/viewvc/llvm-project?rev=105002&view=rev
Log:
Move BaseInfo outside of the EmptySubobject class.
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=105002&r1=105001&r2=105002&view=diff
==============================================================================
--- cfe/trunk/lib/AST/RecordLayoutBuilder.cpp (original)
+++ cfe/trunk/lib/AST/RecordLayoutBuilder.cpp Fri May 28 16:13:31 2010
@@ -23,6 +23,16 @@
namespace {
+struct BaseInfo {
+ const CXXRecordDecl *Class;
+ bool IsVirtual;
+
+ const CXXRecordDecl *PrimaryVirtualBase;
+
+ llvm::SmallVector<BaseInfo*, 4> Bases;
+ const BaseInfo *Derived;
+};
+
/// EmptySubobjectMap - Keeps track of which empty subobjects exist at different
/// offsets while laying out a C++ class.
class EmptySubobjectMap {
@@ -40,16 +50,6 @@
/// member subobject that is empty.
void ComputeEmptySubobjectSizes();
- struct BaseInfo {
- const CXXRecordDecl *Class;
- bool IsVirtual;
-
- const CXXRecordDecl *PrimaryVirtualBase;
-
- llvm::SmallVector<BaseInfo*, 4> Bases;
- const BaseInfo *Derived;
- };
-
llvm::DenseMap<const CXXRecordDecl *, BaseInfo *> VirtualBaseInfo;
llvm::DenseMap<const CXXRecordDecl *, BaseInfo *> NonVirtualBaseInfo;
@@ -148,9 +148,9 @@
}
}
-EmptySubobjectMap::BaseInfo *
-EmptySubobjectMap::ComputeBaseInfo(const CXXRecordDecl *RD, bool IsVirtual,
- const BaseInfo *Derived) {
+BaseInfo *EmptySubobjectMap::ComputeBaseInfo(const CXXRecordDecl *RD,
+ bool IsVirtual,
+ const BaseInfo *Derived) {
BaseInfo *Info;
if (IsVirtual) {
More information about the cfe-commits
mailing list