Home | History | Annotate | Download | only in AST

Lines Matching defs:MD

141   OverriderInfo getOverrider(const CXXMethodDecl *MD, 
143 assert(OverridersMap.count(std::make_pair(MD, BaseOffset)) &&
146 return OverridersMap.lookup(std::make_pair(MD, BaseOffset));
181 const CXXMethodDecl *MD = Overrider.first;
186 assert(SubobjectOffsets.count(std::make_pair(MD->getParent(),
190 CharUnits BaseOffset = SubobjectOffsets[std::make_pair(MD->getParent(),
204 OverriderInfo& Overrider = OverridersMap[std::make_pair(MD, BaseOffset)];
411 for (const auto *MD : RD->methods()) {
412 if (!MD->isVirtual())
414 MD = MD->getCanonicalDecl();
416 OverriderInfo Overrider = getOverrider(MD, Base.getBaseOffset());
419 MD->printQualifiedName(Out);
426 Offset = ComputeReturnAdjustmentBaseOffset(Context, Overrider.Method, MD);
460 bool AddVCallOffset(const CXXMethodDecl *MD, CharUnits OffsetOffset);
464 CharUnits getVCallOffsetOffset(const CXXMethodDecl *MD);
509 bool VCallOffsetMap::AddVCallOffset(const CXXMethodDecl *MD,
513 if (MethodsCanShareVCallOffset(OffsetPair.first, MD))
518 Offsets.push_back(MethodAndOffsetPairTy(MD, OffsetOffset));
522 CharUnits VCallOffsetMap::getVCallOffsetOffset(const CXXMethodDecl *MD) {
525 if (MethodsCanShareVCallOffset(OffsetPair.first, MD))
692 for (const auto *MD : RD->methods()) {
693 if (!MD->isVirtual())
695 MD = MD->getCanonicalDecl();
701 if (!VCallOffsets.AddVCallOffset(MD, OffsetOffset))
709 Overriders->getOverrider(MD, Base.getBaseOffset());
877 void AddThunk(const CXXMethodDecl *MD, const ThunkInfo &Thunk);
902 ComputeThisAdjustment(const CXXMethodDecl *MD,
908 void AddMethod(const CXXMethodDecl *MD, ReturnAdjustment ReturnAdjustment);
1065 void ItaniumVTableBuilder::AddThunk(const CXXMethodDecl *MD,
1070 SmallVectorImpl<ThunkInfo> &ThunksVector = Thunks[MD];
1088 visitAllOverriddenMethods(const CXXMethodDecl *MD, VisitorTy &Visitor) {
1089 assert(MD->isVirtual() && "Method is not virtual!");
1091 for (CXXMethodDecl::method_iterator I = MD->begin_overridden_methods(),
1092 E = MD->end_overridden_methods(); I != E; ++I) {
1103 ComputeAllOverriddenMethods(const CXXMethodDecl *MD,
1105 auto OverriddenMethodsCollector = [&](const CXXMethodDecl *MD) {
1107 return OverriddenMethods.insert(MD).second;
1109 visitAllOverriddenMethods(MD, OverriddenMethodsCollector);
1116 const CXXMethodDecl *MD = MI.first;
1127 Overriders.getOverrider(MD, MethodInfo.BaseOffset);
1141 ComputeThisAdjustment(MD, MethodInfo.BaseOffsetInLayoutClass, Overrider);
1149 if (isa<CXXDestructorDecl>(MD)) {
1166 const CXXMethodDecl *MD;
1172 MD = Component.getFunctionDecl();
1175 MD = Component.getDestructorDecl();
1182 if (MD->getParent() == MostDerivedClass)
1183 AddThunk(MD, Thunk);
1258 const CXXMethodDecl *MD, CharUnits BaseOffsetInLayoutClass,
1264 BaseSubobject OverriddenBaseSubobject(MD->getParent(),
1297 VCallOffsets.getVCallOffsetOffset(MD).getQuantity();
1306 void ItaniumVTableBuilder::AddMethod(const CXXMethodDecl *MD,
1308 if (const CXXDestructorDecl *DD = dyn_cast<CXXDestructorDecl>(MD)) {
1321 Components.push_back(VTableComponent::MakeFunction(MD));
1337 const CXXMethodDecl *MD,
1339 if (Bases.count(MD->getParent()))
1342 for (CXXMethodDecl::method_iterator I = MD->begin_overridden_methods(),
1343 E = MD->end_overridden_methods(); I != E; ++I) {
1422 FindNearestOverriddenMethod(const CXXMethodDecl *MD,
1425 ComputeAllOverriddenMethods(MD, OverriddenMethods);
1497 for (const auto *MD : RD->methods()) {
1498 if (!MD->isVirtual())
1500 MD = MD->getCanonicalDecl();
1504 Overriders.getOverrider(MD, Base.getBaseOffset());
1510 FindNearestOverriddenMethod(MD, PrimaryBases)) {
1511 if (ComputeReturnAdjustmentBaseOffset(Context, MD,
1522 assert(!MethodInfoMap.count(MD) &&
1525 MethodInfoMap.insert(std::make_pair(MD, MethodInfo));
1532 if (!isBuildingConstructorVTable() && OverriddenMD != MD) {
1541 // There's no return adjustment from OverriddenMD and MD,
1542 // but that doesn't mean there isn't one between MD and
1545 ComputeReturnAdjustmentBaseOffset(Context, Overrider.Method, MD);
1559 if (const CXXDestructorDecl *DD = dyn_cast<CXXDestructorDecl>(MD)) {
1560 if (MD->isImplicit()) {
1572 NewVirtualFunctions.push_back(MD);
1578 for (const CXXMethodDecl *MD : NewVirtualFunctions) {
1581 Overriders.getOverrider(MD, Base.getBaseOffset());
1587 assert(!MethodInfoMap.count(MD) &&
1589 MethodInfoMap.insert(std::make_pair(MD, MethodInfo));
1605 ComputeReturnAdjustmentBaseOffset(Context, OverriderMD, MD);
1680 const CXXMethodDecl *MD = I.first;
1682 if (const CXXDestructorDecl *DD = dyn_cast<CXXDestructorDecl>(MD)) {
1688 MethodVTableIndices[MD] = MI.VTableIndex - AddressPoint;
1943 const CXXMethodDecl *MD = Component.getFunctionDecl();
1947 MD);
1949 if (MD->isPure())
1952 if (MD->isDeleted())
2023 const CXXMethodDecl *MD = Component.getUnusedFunctionDecl();
2027 MD);
2029 if (MD->isPure())
2103 const CXXMethodDecl *MD = I.first;
2106 MD);
2108 MethodNamesAndDecls.insert(std::make_pair(MethodName, MD));
2113 const CXXMethodDecl *MD = I.second;
2115 ThunkInfoVectorTy ThunksVector = Thunks[MD];
2165 for (const auto *MD : MostDerivedClass->methods()) {
2167 if (!MD->isVirtual())
2169 MD = MD->getCanonicalDecl();
2173 MD);
2175 if (const CXXDestructorDecl *DD = dyn_cast<CXXDestructorDecl>(MD)) {
2182 assert(MethodVTableIndices.count(MD));
2183 IndicesMap[MethodVTableIndices[MD]] = MethodName;
2470 void AddThunk(const CXXMethodDecl *MD, const ThunkInfo &Thunk) {
2471 SmallVector<ThunkInfo, 1> &ThunksVector = Thunks[MD];
2490 void AddMethod(const CXXMethodDecl *MD, ThunkInfo TI) {
2493 AddThunk(MD, TI);
2495 if (const CXXDestructorDecl *DD = dyn_cast<CXXDestructorDecl>(MD)) {
2500 Components.push_back(VTableComponent::MakeFunction(MD));
2523 const CXXMethodDecl *MD = I.first;
2527 if (MD->getParent() != MostDerivedClass || MI.Shadowed)
2531 if (const CXXDestructorDecl *DD = dyn_cast<CXXDestructorDecl>(MD)) {
2534 MethodVFTableLocations[MD] = Loc;
2679 // This will hold the smallest this offset among overridees of MD.
2902 if (const auto *MD = dyn_cast<CXXMethodDecl>(ND))
2903 if (MD->isVirtual())
2904 Groups[J->second].push_back(MD->getCanonicalDecl());
2968 for (const CXXMethodDecl *MD : VirtualMethods) {
2970 Overriders.getOverrider(MD, Base.getBaseOffset());
2973 FindNearestOverriddenMethod(MD, VisitedBases);
2980 if ((OverriddenMD || FinalOverriderMD != MD) &&
2986 // If MD overrides anything in this vftable, we need to update the
2998 // We must create a new slot if the MD's return type is not trivially
3003 Context, MD, OverriddenMD).isEmpty() ||
3013 assert(!MethodInfoMap.count(MD) &&
3015 MethodInfoMap.insert(std::make_pair(MD, MI));
3026 !(MD == FinalOverriderMD && ThisAdjustmentOffset.isEmpty());
3028 MD->size_overridden_methods()) {
3035 // If we got here, MD is a method not seen in any of the sub-bases or
3043 assert(!MethodInfoMap.count(MD) &&
3045 MethodInfoMap.insert(std::make_pair(MD, MI));
3053 ComputeReturnAdjustmentBaseOffset(Context, FinalOverriderMD, MD);
3072 ForceReturnAdjustmentMangling ? MD : nullptr));
3145 const CXXMethodDecl *MD = Component.getFunctionDecl();
3150 PredefinedExpr::PrettyFunctionNoVirtual, MD);
3152 if (MD->isPure())
3155 if (MD->isDeleted())
3203 const CXXMethodDecl *MD = I.first;
3205 PredefinedExpr::PrettyFunctionNoVirtual, MD);
3207 MethodNamesAndDecls.insert(std::make_pair(MethodName, MD));
3212 const CXXMethodDecl *MD = MethodNameAndDecl.second;
3214 ThunkInfoVectorTy ThunksVector = Thunks[MD];
3499 for (const CXXMethodDecl *MD : Info->BaseWithVPtr->methods()) {
3500 if (!MD->isVirtual())
3503 Overriders.getOverrider(MD->getCanonicalDecl(), BaseOffset);
3507 if (ComputeReturnAdjustmentBaseOffset(Context, OverridingMethod, MD)
3622 const CXXMethodDecl *MD = cast<const CXXMethodDecl>(I.first.getDecl());
3623 assert(MD->isVirtual());
3626 PredefinedExpr::PrettyFunctionNoVirtual, MD);
3628 if (isa<CXXDestructorDecl>(MD)) {