Add USR generation for enums.

llvm-svn: 93543
This commit is contained in:
Ted Kremenek 2010-01-15 20:04:31 +00:00
parent 834d70d3df
commit 8433d1da5e
1 changed files with 11 additions and 0 deletions

View File

@ -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();