Lines Matching refs:ND
66 static const CXXRecordDecl *GetLocalClassDecl(const NamedDecl *ND) { in GetLocalClassDecl() argument
67 const DeclContext *DC = dyn_cast<DeclContext>(ND); in GetLocalClassDecl()
69 DC = getEffectiveDeclContext(ND); in GetLocalClassDecl()
148 bool getNextDiscriminator(const NamedDecl *ND, unsigned &disc) { in getNextDiscriminator() argument
152 if (const CXXRecordDecl *RD = dyn_cast<CXXRecordDecl>(ND)) in getNextDiscriminator()
156 unsigned &discriminator = Uniquifier[ND]; in getNextDiscriminator()
261 void mangleName(const NamedDecl *ND);
263 void mangleNameOrStandardSubstitution(const NamedDecl *ND);
266 bool mangleSubstitution(const NamedDecl *ND);
274 bool mangleStandardSubstitution(const NamedDecl *ND);
276 void addSubstitution(const NamedDecl *ND) { in addSubstitution() argument
277 ND = cast<NamedDecl>(ND->getCanonicalDecl()); in addSubstitution()
279 addSubstitution(reinterpret_cast<uintptr_t>(ND)); in addSubstitution()
296 void mangleUnqualifiedName(const NamedDecl *ND) { in mangleUnqualifiedName() argument
297 mangleUnqualifiedName(ND, ND->getDeclName(), UnknownArity); in mangleUnqualifiedName()
299 void mangleUnqualifiedName(const NamedDecl *ND, DeclarationName Name,
301 void mangleUnscopedName(const NamedDecl *ND);
302 void mangleUnscopedTemplateName(const TemplateDecl *ND);
305 void mangleLocalName(const NamedDecl *ND);
307 void mangleNestedName(const NamedDecl *ND, const DeclContext *DC,
315 void mangleTemplatePrefix(const TemplateDecl *ND);
519 isTemplate(const NamedDecl *ND, const TemplateArgumentList *&TemplateArgs) { in isTemplate() argument
521 if (const FunctionDecl *FD = dyn_cast<FunctionDecl>(ND)){ in isTemplate()
530 dyn_cast<ClassTemplateSpecializationDecl>(ND)) { in isTemplate()
538 static bool isLambda(const NamedDecl *ND) { in isLambda() argument
539 const CXXRecordDecl *Record = dyn_cast<CXXRecordDecl>(ND); in isLambda()
546 void CXXNameMangler::mangleName(const NamedDecl *ND) { in mangleName() argument
552 const DeclContext *DC = getEffectiveDeclContext(ND); in mangleName()
558 if (isa<FunctionDecl>(DC) && ND->hasLinkage() && !isLambda(ND)) in mangleName()
561 else if (GetLocalClassDecl(ND)) { in mangleName()
562 mangleLocalName(ND); in mangleName()
571 if (const TemplateDecl *TD = isTemplate(ND, TemplateArgs)) { in mangleName()
578 mangleUnscopedName(ND); in mangleName()
583 mangleLocalName(ND); in mangleName()
587 mangleNestedName(ND, DC); in mangleName()
603 void CXXNameMangler::mangleUnscopedName(const NamedDecl *ND) { in mangleUnscopedName() argument
607 if (isStdNamespace(IgnoreLinkageSpecDecls(getEffectiveDeclContext(ND)))) in mangleUnscopedName()
610 mangleUnqualifiedName(ND); in mangleUnscopedName()
613 void CXXNameMangler::mangleUnscopedTemplateName(const TemplateDecl *ND) { in mangleUnscopedTemplateName() argument
616 if (mangleSubstitution(ND)) in mangleUnscopedTemplateName()
621 = dyn_cast<TemplateTemplateParmDecl>(ND)) { in mangleUnscopedTemplateName()
626 mangleUnscopedName(ND->getTemplatedDecl()); in mangleUnscopedTemplateName()
627 addSubstitution(ND); in mangleUnscopedTemplateName()
1049 void CXXNameMangler::mangleUnqualifiedName(const NamedDecl *ND, in mangleUnqualifiedName() argument
1064 if (ND && ND->getLinkage() == InternalLinkage && in mangleUnqualifiedName()
1065 getEffectiveDeclContext(ND)->isFileContext()) in mangleUnqualifiedName()
1073 assert(ND && "mangling empty name without declaration"); in mangleUnqualifiedName()
1075 if (const NamespaceDecl *NS = dyn_cast<NamespaceDecl>(ND)) { in mangleUnqualifiedName()
1083 if (const VarDecl *VD = dyn_cast<VarDecl>(ND)) { in mangleUnqualifiedName()
1110 const TagDecl *TD = cast<TagDecl>(ND); in mangleUnqualifiedName()
1152 if (ND == Structor) in mangleUnqualifiedName()
1163 if (ND == Structor) in mangleUnqualifiedName()
1181 if (ND) { in mangleUnqualifiedName()
1182 Arity = cast<FunctionDecl>(ND)->getNumParams(); in mangleUnqualifiedName()
1187 if (isa<CXXMethodDecl>(ND)) in mangleUnqualifiedName()
1214 void CXXNameMangler::mangleNestedName(const NamedDecl *ND, in mangleNestedName() argument
1223 if (const CXXMethodDecl *Method = dyn_cast<CXXMethodDecl>(ND)) { in mangleNestedName()
1230 if (const TemplateDecl *TD = isTemplate(ND, TemplateArgs)) { in mangleNestedName()
1237 mangleUnqualifiedName(ND); in mangleNestedName()
1256 void CXXNameMangler::mangleLocalName(const NamedDecl *ND) { in mangleLocalName() argument
1262 const DeclContext *DC = getEffectiveDeclContext(ND); in mangleLocalName()
1263 if (isa<ObjCMethodDecl>(DC) && isa<FunctionDecl>(ND)) { in mangleLocalName()
1265 mangleUnqualifiedName(ND); in mangleLocalName()
1273 } else if (const CXXRecordDecl *RD = GetLocalClassDecl(ND)) { in mangleLocalName()
1299 if (ND == RD) // equality ok because RD derived from ND above in mangleLocalName()
1300 mangleUnqualifiedName(ND); in mangleLocalName()
1302 mangleNestedName(ND, DC, true /*NoFunction*/); in mangleLocalName()
1320 mangleUnqualifiedName(ND); in mangleLocalName()
1419 const NamedDecl *ND = cast<NamedDecl>(DC); in manglePrefix() local
1420 if (mangleSubstitution(ND)) in manglePrefix()
1425 if (const TemplateDecl *TD = isTemplate(ND, TemplateArgs)) { in manglePrefix()
1430 else if(NoFunction && (isa<FunctionDecl>(ND) || isa<ObjCMethodDecl>(ND))) in manglePrefix()
1432 else if (const ObjCMethodDecl *Method = dyn_cast<ObjCMethodDecl>(ND)) in manglePrefix()
1435 manglePrefix(getEffectiveDeclContext(ND), NoFunction); in manglePrefix()
1436 mangleUnqualifiedName(ND); in manglePrefix()
1439 addSubstitution(ND); in manglePrefix()
1465 void CXXNameMangler::mangleTemplatePrefix(const TemplateDecl *ND) { in mangleTemplatePrefix() argument
1472 if (mangleSubstitution(ND)) in mangleTemplatePrefix()
1477 = dyn_cast<TemplateTemplateParmDecl>(ND)) { in mangleTemplatePrefix()
1482 manglePrefix(getEffectiveDeclContext(ND)); in mangleTemplatePrefix()
1483 mangleUnqualifiedName(ND->getTemplatedDecl()); in mangleTemplatePrefix()
1484 addSubstitution(ND); in mangleTemplatePrefix()
1819 void CXXNameMangler::mangleNameOrStandardSubstitution(const NamedDecl *ND) { in mangleNameOrStandardSubstitution() argument
1820 if (!mangleStandardSubstitution(ND)) in mangleNameOrStandardSubstitution()
1821 mangleName(ND); in mangleNameOrStandardSubstitution()
3216 bool CXXNameMangler::mangleSubstitution(const NamedDecl *ND) { in mangleSubstitution() argument
3218 if (mangleStandardSubstitution(ND)) in mangleSubstitution()
3221 ND = cast<NamedDecl>(ND->getCanonicalDecl()); in mangleSubstitution()
3222 return mangleSubstitution(reinterpret_cast<uintptr_t>(ND)); in mangleSubstitution()
3341 bool CXXNameMangler::mangleStandardSubstitution(const NamedDecl *ND) { in mangleStandardSubstitution() argument
3343 if (const NamespaceDecl *NS = dyn_cast<NamespaceDecl>(ND)) { in mangleStandardSubstitution()
3350 if (const ClassTemplateDecl *TD = dyn_cast<ClassTemplateDecl>(ND)) { in mangleStandardSubstitution()
3368 dyn_cast<ClassTemplateSpecializationDecl>(ND)) { in mangleStandardSubstitution()