Summary
After this patch, DW_TAG_imported_declarations will be emitted into
the DWARF accelerator tables (under .apple_namespaces)
Motivation
Currently LLDB expression evaluation doesn't see through namespace
aliases. This is because LLDB only considers namespaces that are
part of .apple_namespaces when building a nested namespace
identifier for C++, which currently doesn't include import
declarations. The alternative to putting imports into accelerator
tables is to do a linear scan of a DW_TAG_namespace and look
for import declarations that look like they would satisfy the lookup
request, which is prohibitively expensive.
Testing
- Added unit-test
Since import declarations could have empty names I'll have to decide what to do here w.r.t. accelerator tables. The spec says in the case of an empty name we can refer to the entity by the name of the entity it is importing.