summaryrefslogtreecommitdiffstats
path: root/lldb/source/Expression/ClangASTSource.cpp
diff options
context:
space:
mode:
authorGreg Clayton <gclayton@apple.com>2010-10-13 03:15:28 +0000
committerGreg Clayton <gclayton@apple.com>2010-10-13 03:15:28 +0000
commit247399230d7dd1749e502538823b14b0e16e3cf0 (patch)
tree77bfe9abf413a99ad5e066507fd27229f6fefe66 /lldb/source/Expression/ClangASTSource.cpp
parent8c64bbe032380cb0bc1a7a4d91f7376f91450ec8 (diff)
downloadbcm5719-llvm-247399230d7dd1749e502538823b14b0e16e3cf0.tar.gz
bcm5719-llvm-247399230d7dd1749e502538823b14b0e16e3cf0.zip
Fixed C++ class clang type creation and display by making sure we omit
artifical members (like the vtable pointer member that shows up in the DWARF). We were adding this to each class which was making all member variables be off by a pointer size. Added a test case so we can track this with "test/forward". Fixed the type name index in DWARF to include all the types after finding some types were being omitted due to the DW_AT_specification having the DW_AT_declaration attribute which was being read into the real type instances when there were forward declarations in the DWARF, causing the type to be omitted. We now check to make sure any DW_AT_declaration values are only respected when parsing types if the attribute is from the current DIE. After fixing the missing types, we ran into some issues with the expression parser finding duplicate entries for __va_list_tag since they are built in types and would result in a "duplicate __va_list_tag definition" error. We are now just ignoring this name during lookup, but we will need to see if we can get the name lookup function to not get called in these cases. Fixed an issue that would cause an assertion where DW_TAG_subroutine_types that had no children, would not properly make a clang function type of: "void (*) (void)". llvm-svn: 116392
Diffstat (limited to 'lldb/source/Expression/ClangASTSource.cpp')
-rw-r--r--lldb/source/Expression/ClangASTSource.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/lldb/source/Expression/ClangASTSource.cpp b/lldb/source/Expression/ClangASTSource.cpp
index 3d71da5341f..0808b4ccde5 100644
--- a/lldb/source/Expression/ClangASTSource.cpp
+++ b/lldb/source/Expression/ClangASTSource.cpp
@@ -70,7 +70,13 @@ DeclContext::lookup_result ClangASTSource::FindExternalVisibleDeclsByName(const
NameSearchContext NSC(*this, Decls, Name, DC);
- DeclMap.GetDecls(NSC, Name.getAsString().c_str());
+ std::string name (Name.getAsString());
+ // TODO: Figure out what to do here, after recent changes to the DWARF
+ // parser where more types are now in type by name index, we were sometimes
+ // finding our own version of a builtin? Skip it for now until we figure out
+ // how to get around this properly.
+ if (name.compare("__va_list_tag") != 0)
+ DeclMap.GetDecls(NSC, name.c_str());
return SetExternalVisibleDeclsForName(DC, Name, Decls);
}
OpenPOWER on IntegriCloud