Lines Matching refs:Bases
46 /// Bases - Information about the base subobjects.
47 SmallVector<BaseSubobjectInfo*, 4> Bases;
187 // Check the bases.
188 for (const CXXBaseSpecifier &Base : Class->bases()) {
233 // We only need to check empty bases.
251 // We only care about empty bases.
279 // Traverse all non-virtual bases.
281 for (const BaseSubobjectInfo *Base : Info->Bases) {
320 // subobject of non-empty bases, are empty bases that can be placed at
329 // Traverse all non-virtual bases.
331 for (const BaseSubobjectInfo *Base : Info->Bases) {
389 // Traverse all non-virtual bases.
390 for (const CXXBaseSpecifier &Base : RD->bases()) {
402 // This is the most derived class, traverse virtual bases as well.
484 // field subobjects are subobjects of empty bases that can be placed at offset
495 // Traverse all non-virtual bases.
496 for (const CXXBaseSpecifier &Base : RD->bases()) {
507 // This is the most derived class, traverse virtual bases as well.
552 // field subobjects are subobjects of empty bases that can be placed at
637 /// Bases - base classes and their offsets in the record.
638 BaseOffsetsMapTy Bases;
651 /// VisitedVirtualBases - A set of all the visited virtual bases, used to
652 /// avoid visiting virtual bases more than once.
691 /// VirtualBaseInfo - Map from all the (direct or indirect) virtual bases
695 /// NonVirtualBaseInfo - Map from all the direct non-virtual bases of the
700 /// bases of the given class.
726 /// LayoutVirtualBases - Lays out all the virtual bases.
789 for (const auto &I : RD->bases()) {
791 "Cannot layout class with dependent bases.");
822 // Compute all the primary virtual bases for all of our direct and
823 // indirect bases, and record all their primary virtual base classes.
829 for (const auto &I : RD->bases()) {
830 // Ignore virtual bases.
917 // Now go through all direct bases.
918 for (const auto &I : RD->bases()) {
923 Info->Bases
927 // Traversing the bases must have created the base info for our primary
943 for (const auto &I : RD->bases()) {
957 // Add the base info to the map of non-virtual bases.
1030 // Now lay out the non-virtual bases.
1031 for (const auto &I : RD->bases()) {
1033 // Ignore virtual bases.
1059 assert(!Bases.count(Base->Class) && "base offset already exists!");
1060 Bases.insert(std::make_pair(Base->Class, Offset));
1067 // This base isn't interesting, it has no virtual bases.
1087 // Now go through all direct non-virtual bases.
1089 for (const BaseSubobjectInfo *Base : Info->Bases) {
1112 for (const CXXBaseSpecifier &Base : RD->bases()) {
1114 "Cannot layout class with dependent bases.");
1124 // Only visit virtual bases once.
1136 // This base isn't interesting since it doesn't have any virtual bases.
1289 // Lay out the vtable and the non-virtual bases.
1299 // Lay out the virtual bases and add the primary virtual base offsets.
1307 // Check that we have base offsets for all bases.
1308 for (const CXXBaseSpecifier &Base : RD->bases()) {
1314 assert(Bases.count(BaseDecl) && "Did not find base offset!");
1317 // And all virtual bases.
2116 // * There is no explicit primary base for the purposes of layout. All bases
2117 // with vfptrs are laid out first, followed by all bases without vfptrs.
2120 // shared with a, non-virtual bases. These bases need not be the same. vfptrs
2123 // is always before fields but can be in the middle of the non-virtual bases
2124 // due to the two-pass layout scheme for non-virtual-bases.
2125 // * Virtual bases sometimes require a 'vtordisp' field that is laid out before
2133 // * vfptrs are injected after all bases and fields have been laid out. In
2135 // pushes all bases and fields back by the alignment imposed by those bases
2138 // * vbptrs are injected after all bases and fields have been laid out. In
2140 // pushes all bases and fields back by the alignment imposed by those bases
2151 // * The ABI attempts to avoid aliasing of zero sized bases by adding padding
2152 // between bases or vbases with specific properties. The criteria for
2153 // additional padding between two bases is that the first base is zero sized
2159 // bases is 1 byte. The padding added between vbases depends on the alignment
2166 // record inherits required alignment from all of its fields and bases.
2248 /// \brief Compute the set of virtual bases for which vtordisps are required.
2264 /// __declspec(align()) on the record itself or one of its fields or bases.
2283 BaseOffsetsMapTy Bases;
2462 // The MS-ABI lays out all bases that contain leading vfptrs before it lays
2463 // out any bases that do not contain vfptrs. We implement this as two passes
2464 // over the bases. This approach guarantees that the primary base is laid out
2466 // information about the bases, such as reqruied alignment and the presence of
2469 // Iterate through the bases and lay out the non-virtual ones.
2470 for (const CXXBaseSpecifier &Base : RD->bases()) {
2473 // Mark and skip virtual bases.
2483 // Only lay out bases with extendable VFPtrs on the first pass.
2503 // Iterate through the bases and lay out the non-virtual ones.
2504 for (const CXXBaseSpecifier &Base : RD->bases()) {
2509 // Only lay out bases without extendable VFPtrs on the second pass.
2511 VBPtrOffset = Bases[BaseDecl] + BaseLayout.getNonVirtualSize();
2522 VBPtrOffset = Bases[BaseDecl] + BaseLayout.getNonVirtualSize();
2529 VBPtrOffset = Bases[SharedVBPtrBase] + Layout.getVBPtrOffset();
2537 // Insert padding between two bases if the left first one is zero sized or
2556 Bases.insert(std::make_pair(BaseDecl, BaseOffset));
2673 for (BaseOffsetsMapTy::value_type &Base : Bases)
2699 for (BaseOffsetsMapTy::value_type &Base : Bases)
2725 // Iterate through the virtual bases and lay them out.
2731 // Insert padding between two bases if the left first one is zero sized or
2733 // with a zero sized base. The padding between virtual bases is 4
2792 // Recursively walks the non-virtual bases of a class and determines if any of
2793 // them are in the bases with overridden methods set.
2800 // If any of a virtual bases non-virtual bases (recursively) requires a
2802 for (const CXXBaseSpecifier &Base : RD->bases())
2813 // /vd2 or #pragma vtordisp(2): Always use vtordisps for virtual bases with
2825 // If any of our bases need a vtordisp for this type, so do we. Check our
2826 // direct bases for vtordisp requirements.
2827 for (const CXXBaseSpecifier &Base : RD->bases()) {
2846 // contains one of these bases as a non-virtual base will also require a
2866 // For each of our virtual bases, check if it is in the set of overridden
2867 // bases or if it transitively contains a non-virtual base that is.
2914 Builder.Bases, Builder.VBases);
2947 Builder.PrimaryBaseIsVirtual, nullptr, false, false, Builder.Bases,
3134 // Dump bases.
3151 SmallVector<const CXXRecordDecl *, 4> Bases;
3152 for (const CXXBaseSpecifier &Base : CXXRD->bases()) {
3154 "Cannot layout class with dependent bases.");
3156 Bases.push_back(Base.getType()->getAsCXXRecordDecl());
3160 std::stable_sort(Bases.begin(), Bases.end(),
3165 // Dump (non-virtual) bases
3166 for (const CXXRecordDecl *Base : Bases) {
3210 // Dump virtual bases.