forked from OSchip/llvm-project
parent
834d70d3df
commit
8433d1da5e
|
@ -74,6 +74,7 @@ public:
|
|||
|
||||
void VisitBlockDecl(BlockDecl *D);
|
||||
void VisitDeclContext(DeclContext *D);
|
||||
void VisitEnumDecl(EnumDecl *D);
|
||||
void VisitFunctionDecl(FunctionDecl *D);
|
||||
void VisitNamedDecl(NamedDecl *D);
|
||||
void VisitNamespaceDecl(NamespaceDecl *D);
|
||||
|
@ -96,6 +97,16 @@ void USRGenerator::VisitDeclContext(DeclContext *DC) {
|
|||
Visit(D);
|
||||
}
|
||||
|
||||
void USRGenerator::VisitEnumDecl(EnumDecl *D) {
|
||||
VisitDeclContext(D->getDeclContext());
|
||||
Out << "@E^";
|
||||
const std::string &s = D->getNameAsString();
|
||||
if (s.empty())
|
||||
Out << "anon";
|
||||
else
|
||||
Out << s;
|
||||
}
|
||||
|
||||
void USRGenerator::VisitFunctionDecl(FunctionDecl *D) {
|
||||
VisitDeclContext(D->getDeclContext());
|
||||
Out << "@F^" << D->getNameAsString();
|
||||
|
|
Loading…
Reference in New Issue