Lines Matching defs:Method
64 /// Method - The method decl of the overrider.
65 const CXXMethodDecl *Method;
74 OverriderInfo() : Method(nullptr), VirtualBase(nullptr),
137 /// getOverrider - Get the final overrider for the given method declaration in
194 const UniqueVirtualMethod &Method = I->second.front();
196 const CXXRecordDecl *OverriderRD = Method.Method->getParent();
198 std::make_pair(OverriderRD, Method.Subobject))
202 Method.Subobject)];
205 assert(!Overrider.Method && "Overrider should not exist yet!");
208 Overrider.Method = Method.Method;
209 Overrider.VirtualBase = Method.InVirtualSubobject;
421 Overrider.Method->printQualifiedName(Out);
425 if (!Overrider.Method->isPure())
426 Offset = ComputeReturnAdjustmentBaseOffset(Context, Overrider.Method, MD);
831 /// MethodInfo - Contains information about a method in a vtable.
834 /// BaseOffset - The base offset of this method.
838 /// method.
841 /// VTableIndex - The index in the vtable that this method has.
880 /// AddThunk - Add a thunk for the given method.
1086 /// Visit all the methods overridden by the given method recursively,
1087 /// in a depth-first pre-order. The Visitor's visitor method returns a bool
1089 /// method (i.e. returning false stops the iteration).
1093 assert(MD->isVirtual() && "Method is not virtual!");
1109 // Don't recurse on this method if we've already collected it.
1115 /// ComputeAllOverriddenMethods - Given a method decl, will return a set of all
1125 // Now go through the method info map and see if any of the methods need
1138 // Get the final overrider for this method.
1168 /// Clear the method info map.
1276 if (Overrider.Method->isPure())
1282 BaseSubobject OverriderBaseSubobject(Overrider.Method->getParent(),
1349 /// OverridesIndirectMethodInBase will return true if given C::f as the method
1433 /// FindNearestOverriddenMethod - Given a method, returns the overridden method
1434 /// from the nearest base. Returns null if no method was found.
1450 // We found our overridden method.
1525 // Check if this virtual member function overrides a method in a primary
1532 // Replace the method info of the overridden method with our own
1533 // method.
1535 "Did not find the overridden method!");
1542 "Should not have method info for this method yet!");
1547 // If the overridden method exists in a virtual base class or a direct
1558 Overrider.Method->getParent() == MostDerivedClass) {
1564 ComputeReturnAdjustmentBaseOffset(Context, Overrider.Method, MD);
1569 AddThunk(Overrider.Method,
1605 // Insert the method info for this method.
1610 "Should not have method info for this method yet!");
1614 const CXXMethodDecl *OverriderMD = Overrider.Method;
1633 AddMethod(Overrider.Method, ReturnAdjustment);
2129 // We store the method names in a map to get a stable order.
2151 assert(LHS.Method == nullptr && RHS.Method == nullptr);
2394 // 3. Virtual method definitions expect their 'this' parameter to point to the
2395 // first vfptr whose table provides a compatible overridden method. In many
2397 // the method instead of passing through a thunk.
2400 // A compatible overridden method is one which does not have a non-trivial
2404 // layout of the defining class, and the method definition will subtract
2420 // b) a method overriding a method in a virtual base.
2461 /// MethodInfo - Contains information about a method in a vtable.
2465 /// this method's base has, or zero.
2468 /// VFTableIndex - The index in the vftable that this method has.
2509 /// AddThunk - Add a thunk for the given method.
2522 /// method, relative to the beginning of the MostDerivedClass.
2635 /// that define the given method.
2643 // Don't recurse on this method if we've already collected it.
2709 // for the given method, relative to the beginning of the MostDerivedClass.
2713 visitAllOverriddenMethods(Overrider.Method, Collector);
2716 // in the base that defines the method.
2721 Overrider.Method->getParent()->lookupInBases(BaseInSet, &Collector.Bases,
2727 // in the derived classes that inherit this method.
2732 Context.getASTRecordLayout(Overrider.Method->getParent());
2753 // derived class and it overrides a method of the B's own vbase A,
2766 if (isa<CXXDestructorDecl>(Overrider.Method)) {
2785 assert(!First && "Method not found in the given subobject?");
2910 if (Overrider.Method->getParent() == MostDerivedClass ||
3015 const CXXMethodDecl *FinalOverriderMD = FinalOverrider.Method;
3034 // If the overridden method went to a different vftable, skip it.
3043 // Once a chain of method overrides adds a return adjusting vftable slot,
3044 // all subsequent overrides will also use an extra method slot.
3050 // No return adjustment needed - just replace the overridden method info
3057 "Should not have method info for this method yet!");
3063 // the overrider. Mark the overriden method as shadowed by the new slot.
3067 // unless the method is the final overrider without this adjustment.
3073 // e.g. each method that wasn't seen in any of the visited sub-bases
3078 // If we got here, MD is a method not seen in any of the sub-bases or
3079 // it requires return adjustment. Insert the method info for this method.
3087 "Should not have method info for this method yet!");
3133 if (!R.isEmpty() || TI.Method) {
3137 << TI.Method->getReturnType().getCanonicalType().getAsString()
3242 // We store the method names in a map to get a stable order.
3675 "Only use this method for virtual methods or dtors");