[Lldb-commits] [lldb] r148145 - /lldb/trunk/source/Symbol/ClangASTContext.cpp

Sean Callanan scallanan at apple.com
Fri Jan 13 14:10:18 PST 2012


Author: spyffe
Date: Fri Jan 13 16:10:18 2012
New Revision: 148145

URL: http://llvm.org/viewvc/llvm-project?rev=148145&view=rev
Log:
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.

Modified:
    lldb/trunk/source/Symbol/ClangASTContext.cpp

Modified: lldb/trunk/source/Symbol/ClangASTContext.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Symbol/ClangASTContext.cpp?rev=148145&r1=148144&r2=148145&view=diff
==============================================================================
--- lldb/trunk/source/Symbol/ClangASTContext.cpp (original)
+++ lldb/trunk/source/Symbol/ClangASTContext.cpp Fri Jan 13 16:10:18 2012
@@ -1119,6 +1119,9 @@
                                                  SourceLocation(),
                                                  SourceLocation(),
                                                  name && name[0] ? &ast->Idents.get(name) : NULL);
+    
+    if (!name)
+        decl->setAnonymousStructOrUnion(true);
 
     if (decl_ctx)
     {





More information about the lldb-commits mailing list