Home | History | Annotate | Download | only in AST

Lines Matching defs:Bases

47   /// Bases - Information about the base subobjects.
48 SmallVector<BaseSubobjectInfo*, 4> Bases;
142 // Check the bases.
143 for (const auto &I : Class->bases()) {
188 // We only need to check empty bases.
206 // We only care about empty bases.
234 // Traverse all non-virtual bases.
236 for (unsigned I = 0, E = Info->Bases.size(); I != E; ++I) {
237 BaseSubobjectInfo* Base = Info->Bases[I];
276 // subobject of non-empty bases, are empty bases that can be placed at
285 // Traverse all non-virtual bases.
287 for (unsigned I = 0, E = Info->Bases.size(); I != E; ++I) {
288 BaseSubobjectInfo* Base = Info->Bases[I];
346 // Traverse all non-virtual bases.
347 for (const auto &I : RD->bases()) {
359 // This is the most derived class, traverse virtual bases as well.
441 // field subobjects are subobjects of empty bases that can be placed at offset
452 // Traverse all non-virtual bases.
453 for (const auto &I : RD->bases()) {
464 // This is the most derived class, traverse virtual bases as well.
509 // field subobjects are subobjects of empty bases that can be placed at
594 /// Bases - base classes and their offsets in the record.
595 BaseOffsetsMapTy Bases;
608 /// VisitedVirtualBases - A set of all the visited virtual bases, used to
609 /// avoid visiting virtual bases more than once.
672 /// VirtualBaseInfo - Map from all the (direct or indirect) virtual bases
676 /// NonVirtualBaseInfo - Map from all the direct non-virtual bases of the
681 /// bases of the given class.
707 /// LayoutVirtualBases - Lays out all the virtual bases.
771 for (const auto &I : RD->bases()) {
773 "Cannot layout class with dependent bases.");
804 // Compute all the primary virtual bases for all of our direct and
805 // indirect bases, and record all their primary virtual base classes.
811 for (const auto &I : RD->bases()) {
812 // Ignore virtual bases.
901 // Now go through all direct bases.
902 for (const auto &I : RD->bases()) {
907 Info->Bases.push_back(ComputeBaseSubobjectInfo(BaseDecl, IsVirtual, Info));
911 // Traversing the bases must have created the base info for our primary
926 for (const auto &I : RD->bases()) {
940 // Add the base info to the map of non-virtual bases.
1013 // Now lay out the non-virtual bases.
1014 for (const auto &I : RD->bases()) {
1016 // Ignore virtual bases.
1041 assert(!Bases.count(Base->Class) && "base offset already exists!");
1042 Bases.insert(std::make_pair(Base->Class, Offset));
1050 // This base isn't interesting, it has no virtual bases.
1070 // Now go through all direct non-virtual bases.
1072 for (unsigned I = 0, E = Info->Bases.size(); I != E; ++I) {
1073 const BaseSubobjectInfo *Base = Info->Bases[I];
1097 for (const auto &I : RD->bases()) {
1099 "Cannot layout class with dependent bases.");
1109 // Only visit virtual bases once.
1121 // This base isn't interesting since it doesn't have any virtual bases.
1284 // Lay out the vtable and the non-virtual bases.
1294 // Lay out the virtual bases and add the primary virtual base offsets.
1302 // Check that we have base offsets for all bases.
1303 for (const auto &I : RD->bases()) {
1309 assert(Bases.count(BaseDecl) && "Did not find base offset!");
1312 // And all virtual bases.
2054 // * There is no explicit primary base for the purposes of layout. All bases
2055 // with vfptrs are laid out first, followed by all bases without vfptrs.
2058 // shared with a, non-virtual bases. These bases need not be the same. vfptrs
2061 // is always before fields but can be in the middle of the non-virtual bases
2062 // due to the two-pass layout scheme for non-virtual-bases.
2063 // * Virtual bases sometimes require a 'vtordisp' field that is laid out before
2071 // * vfptrs are injected after all bases and fields have been laid out. In
2073 // pushes all bases and fields back by the alignment imposed by those bases
2076 // * vbptrs are injected after all bases and fields have been laid out. In
2078 // pushes all bases and fields back by the alignment imposed by those bases
2089 // * The ABI attempts to avoid aliasing of zero sized bases by adding padding
2090 // between bases or vbases with specific properties. The criteria for
2091 // additional padding between two bases is that the first base is zero sized
2097 // bases is 1 byte. The padding added between vbases depends on the alignment
2104 // record inherites required alignment from all of its fields an bases.
2187 /// \brief Compute the set of virtual bases for which vtordisps are required.
2202 /// __declspec(align()) on the record itself or one of its fields or bases.
2219 BaseOffsetsMapTy Bases;
2372 // The MS-ABI lays out all bases that contain leading vfptrs before it lays
2373 // out any bases that do not contain vfptrs. We implement this as two passes
2374 // over the bases. This approach guarantees that the primary base is laid out
2376 // information about the bases, such as reqruied alignment and the presence of
2379 // Iterate through the bases and lay out the non-virtual ones.
2380 for (const auto &I : RD->bases()) {
2383 // Mark and skip virtual bases.
2393 // Only lay out bases with extendable VFPtrs on the first pass.
2413 // Iterate through the bases and lay out the non-virtual ones.
2414 for (const auto &I : RD->bases()) {
2419 // Only lay out bases without extendable VFPtrs on the second pass.
2421 VBPtrOffset = Bases[BaseDecl] + BaseLayout.getNonVirtualSize();
2432 VBPtrOffset = Bases[BaseDecl] + BaseLayout.getNonVirtualSize();
2439 VBPtrOffset = Bases[SharedVBPtrBase] + Layout.getVBPtrOffset();
2447 // Insert padding between two bases if the left first one is zero sized or
2455 Bases.insert(std::make_pair(BaseDecl, BaseOffset));
2565 for (BaseOffsetsMapTy::iterator i = Bases.begin(), e = Bases.end();
2579 // bases by the offset amount.
2587 for (BaseOffsetsMapTy::iterator i = Bases.begin(), e = Bases.end();
2614 // Iterate through the virtual bases and lay them out.
2620 // Insert padding between two bases if the left first one is zero sized or
2622 // with a zero sized base. The padding between virtual bases is 4
2658 // Recursively walks the non-virtual bases of a class and determines if any of
2659 // them are in the bases with overridden methods set.
2666 // If any of a virtual bases non-virtual bases (recursively) requires a
2668 for (const auto &I : RD->bases())
2680 // /vd2 or #pragma vtordisp(2): Always use vtordisps for virtual bases with
2692 // If any of our bases need a vtordisp for this type, so do we. Check our
2693 // direct bases for vtordisp requirements.
2694 for (const auto &I : RD->bases()) {
2713 // contains one of these bases as a non-virtual base will also require a
2733 // For each of our virtual bases, check if it is in the set of overridden
2734 // bases or if it transitively contains a non-virtual base that is.
2761 Builder.Bases, Builder.VBases);
2831 Builder.Bases, Builder.VBases);
3014 SmallVector<const CXXRecordDecl *, 4> Bases;
3015 for (const auto &I : RD->bases()) {
3017 "Cannot layout class with dependent bases.");
3019 Bases.push_back(I.getType()->getAsCXXRecordDecl());
3023 std::stable_sort(Bases.begin(), Bases.end(),
3028 // Dump (non-virtual) bases
3029 for (SmallVectorImpl<const CXXRecordDecl *>::iterator I = Bases.begin(),
3030 E = Bases.end();
3067 // Dump virtual bases.