forked from OSchip/llvm-project
USR generation: look at the typedef of an anonymous struct (if any) when trying to generate a USR.
llvm-svn: 93572
This commit is contained in:
parent
1ec62347e5
commit
a7f7b17bc7
|
@ -129,8 +129,12 @@ void USRGenerator::VisitRecordDecl(RecordDecl *D) {
|
|||
Out << "@S^";
|
||||
// FIXME: Better support for anonymous structures.
|
||||
const std::string &s = D->getNameAsString();
|
||||
if (s.empty())
|
||||
Out << "^anon";
|
||||
if (s.empty()) {
|
||||
if (TypedefDecl *TD = D->getTypedefForAnonDecl())
|
||||
Out << "^anontd^" << TD->getNameAsString();
|
||||
else
|
||||
Out << "^anon";
|
||||
}
|
||||
else
|
||||
Out << s;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue