Lines Matching full:bases

46   /// Bases - Information about the base subobjects.
47 SmallVector<BaseSubobjectInfo*, 4> Bases;
188 // Check the bases.
189 for (const CXXBaseSpecifier &Base : Class->bases()) {
234 // We only need to check empty bases.
252 // We only care about empty bases.
280 // Traverse all non-virtual bases.
282 for (const BaseSubobjectInfo *Base : Info->Bases) {
321 // subobject of non-empty bases, are empty bases that can be placed at
330 // Traverse all non-virtual bases.
332 for (const BaseSubobjectInfo *Base : Info->Bases) {
390 // Traverse all non-virtual bases.
391 for (const CXXBaseSpecifier &Base : RD->bases()) {
403 // This is the most derived class, traverse virtual bases as well.
485 // field subobjects are subobjects of empty bases and potentially-overlapping
501 // Traverse all non-virtual bases.
502 for (const CXXBaseSpecifier &Base : RD->bases()) {
514 // This is the most derived class, traverse virtual bases as well.
560 // field subobjects are subobjects of empty bases that can be placed at
677 /// Bases - base classes and their offsets in the record.
678 BaseOffsetsMapTy Bases;
691 /// VisitedVirtualBases - A set of all the visited virtual bases, used to
692 /// avoid visiting virtual bases more than once.
737 /// VirtualBaseInfo - Map from all the (direct or indirect) virtual bases
741 /// NonVirtualBaseInfo - Map from all the direct non-virtual bases of the
746 /// bases of the given class.
772 /// LayoutVirtualBases - Lays out all the virtual bases.
839 for (const auto &I : RD->bases()) {
841 "Cannot layout class with dependent bases.");
872 // Compute all the primary virtual bases for all of our direct and
873 // indirect bases, and record all their primary virtual base classes.
879 for (const auto &I : RD->bases()) {
880 // Ignore virtual bases.
967 // Now go through all direct bases.
968 for (const auto &I : RD->bases()) {
973 Info->Bases.push_back(ComputeBaseSubobjectInfo(BaseDecl, IsVirtual, Info));
977 // Traversing the bases must have created the base info for our primary
993 for (const auto &I : RD->bases()) {
1007 // Add the base info to the map of non-virtual bases.
1083 // Now lay out the non-virtual bases.
1084 for (const auto &I : RD->bases()) {
1086 // Ignore virtual bases.
1112 assert(!Bases.count(Base->Class) && "base offset already exists!");
1113 Bases.insert(std::make_pair(Base->Class, Offset));
1120 // This base isn't interesting, it has no virtual bases.
1140 // Now go through all direct non-virtual bases.
1142 for (const BaseSubobjectInfo *Base : Info->Bases) {
1165 for (const CXXBaseSpecifier &Base : RD->bases()) {
1167 "Cannot layout class with dependent bases.");
1177 // Only visit virtual bases once.
1189 // This base isn't interesting since it doesn't have any virtual bases.
1393 // Lay out the vtable and the non-virtual bases.
1403 // Lay out the virtual bases and add the primary virtual base offsets.
1411 // Check that we have base offsets for all bases.
1412 for (const CXXBaseSpecifier &Base : RD->bases()) {
1418 assert(Bases.count(BaseDecl) && "Did not find base offset!");
1421 // And all virtual bases.
2478 // * There is no explicit primary base for the purposes of layout. All bases
2479 // with vfptrs are laid out first, followed by all bases without vfptrs.
2482 // shared with a, non-virtual bases. These bases need not be the same. vfptrs
2485 // is always before fields but can be in the middle of the non-virtual bases
2486 // due to the two-pass layout scheme for non-virtual-bases.
2487 // * Virtual bases sometimes require a 'vtordisp' field that is laid out before
2495 // * vfptrs are injected after all bases and fields have been laid out. In
2497 // pushes all bases and fields back by the alignment imposed by those bases
2500 // * vbptrs are injected after all bases and fields have been laid out. In
2502 // pushes all bases and fields back by the alignment imposed by those bases
2513 // * The ABI attempts to avoid aliasing of zero sized bases by adding padding
2514 // between bases or vbases with specific properties. The criteria for
2515 // additional padding between two bases is that the first base is zero sized
2521 // bases is 1 byte. The padding added between vbases depends on the alignment
2528 // record inherits required alignment from all of its fields and bases.
2614 /// Compute the set of virtual bases for which vtordisps are required.
2632 /// __declspec(align()) on the record itself or one of its fields or bases.
2651 BaseOffsetsMapTy Bases;
2833 // The MS-ABI lays out all bases that contain leading vfptrs before it lays
2834 // out any bases that do not contain vfptrs. We implement this as two passes
2835 // over the bases. This approach guarantees that the primary base is laid out
2837 // information about the bases, such as required alignment and the presence of
2841 // Iterate through the bases and lay out the non-virtual ones.
2842 for (const CXXBaseSpecifier &Base : RD->bases()) {
2846 // Mark and skip virtual bases.
2856 // Only lay out bases with extendable VFPtrs on the first pass.
2888 // Iterate through the bases and lay out the non-virtual ones.
2889 for (const CXXBaseSpecifier &Base : RD->bases()) {
2894 // Only lay out bases without extendable VFPtrs on the second pass.
2896 VBPtrOffset = Bases[BaseDecl] + BaseLayout.getNonVirtualSize();
2907 VBPtrOffset = Bases[BaseDecl] + BaseLayout.getNonVirtualSize();
2914 VBPtrOffset = Bases[SharedVBPtrBase] + Layout.getVBPtrOffset();
2937 // Insert padding between two bases if the left first one is zero sized or
2965 Bases.insert(std::make_pair(BaseDecl, BaseOffset));
3003 bool HasBases = ParentClass && (!ParentClass->bases().empty() ||
3108 // It is possible that there were no fields or bases located after vbptr,
3121 for (BaseOffsetsMapTy::value_type &Base : Bases)
3152 for (BaseOffsetsMapTy::value_type &Base : Bases)
3178 // Iterate through the virtual bases and lay them out.
3184 // Insert padding between two bases if the left first one is zero sized or
3186 // with a zero sized base. The padding between virtual bases is 4
3247 // Recursively walks the non-virtual bases of a class and determines if any of
3248 // them are in the bases with overridden methods set.
3255 // If any of a virtual bases non-virtual bases (recursively) requires a
3257 for (const CXXBaseSpecifier &Base : RD->bases())
3268 // /vd2 or #pragma vtordisp(2): Always use vtordisps for virtual bases with
3280 // If any of our bases need a vtordisp for this type, so do we. Check our
3281 // direct bases for vtordisp requirements.
3282 for (const CXXBaseSpecifier &Base : RD->bases()) {
3301 // contains one of these bases as a non-virtual base will also require a
3321 // For each of our virtual bases, check if it is in the set of overridden
3322 // bases or if it transitively contains a non-virtual base that is.
3372 Builder.Bases, Builder.VBases);
3407 Builder.PrimaryBaseIsVirtual, nullptr, false, false, Builder.Bases,
3628 // Dump bases.
3645 SmallVector<const CXXRecordDecl *, 4> Bases;
3646 for (const CXXBaseSpecifier &Base : CXXRD->bases()) {
3648 "Cannot layout class with dependent bases.");
3650 Bases.push_back(Base.getType()->getAsCXXRecordDecl());
3655 Bases, [&](const CXXRecordDecl *L, const CXXRecordDecl *R) {
3659 // Dump (non-virtual) bases
3660 for (const CXXRecordDecl *Base : Bases) {
3707 // Dump virtual bases.
3783 for (auto I : CXXRD->bases()) {