forked from OSchip/llvm-project
If the name of a struct or union is NULL in the
debug info, call it anonymous. This isn't perfect, because Clang actually considers the following struct not to be anonymous: – struct { int x; int y; } g_foo; - but DWARF doesn't make the distinction. llvm-svn: 148145
This commit is contained in:
parent
a6e61a7820
commit
7282e2acf4
|
@ -1120,6 +1120,9 @@ ClangASTContext::CreateRecordType (DeclContext *decl_ctx, AccessType access_type
|
|||
SourceLocation(),
|
||||
name && name[0] ? &ast->Idents.get(name) : NULL);
|
||||
|
||||
if (!name)
|
||||
decl->setAnonymousStructOrUnion(true);
|
||||
|
||||
if (decl_ctx)
|
||||
{
|
||||
if (access_type != eAccessNone)
|
||||
|
|
Loading…
Reference in New Issue