Add unscoped enumeration members to the "globals" manual dwarf index. This
effectively makes them discoverable as global variables (which they
essentially are).
Before expression evaluator failed to lookup enumerators unless the
enumeration type has been already completed.
Consider the example:
enum MyEnum { eFoo = 1 }; MyEnum my_enum = eFoo;
(lldb) p eFoo
error: <user expression 2>:1:1: use of undeclared identifier 'eFoo'
eFoo
^
(lldb) p my_enum + eFoo
(int) $0 = 2
With this patch all unscoped enumerators can be looked up same as the global
variables and the expression evaluation works as expected.
SBTarget::FindGlobalVariables() now returns unscoped enumerators as well.
clang-tidy: error: 'Plugins/SymbolFile/DWARF/ManualDWARFIndex.h' file not found [clang-diagnostic-error]
not useful