[lldb][NFCI] Redefine dw_attr_t typedef with llvm::dwarf::Attribute
authorAlex Langford <alangford@apple.com>
Wed, 10 May 2023 20:18:23 +0000 (13:18 -0700)
committerAlex Langford <alangford@apple.com>
Fri, 12 May 2023 18:58:50 +0000 (11:58 -0700)
commit64f1fda29e2dd133c84f23474e29de02d7ed392d
treefed67f8ca47062663c67c49c00a7fed3d47e6580
parent2ee4ddae043946d74a5744fe6590759ae383bb94
[lldb][NFCI] Redefine dw_attr_t typedef with llvm::dwarf::Attribute

Similar to dw_form_t, dw_attr_t is typedef'd to be a uint16_t. LLVM
defines their type `llvm::dwarf::Attribute` as an enum backed by a
uint16_t. Switching to the LLVM type buys us type checking and the
requirement of explicit casts.

Differential Revision: https://reviews.llvm.org/D150299
lldb/include/lldb/Core/dwarf.h
lldb/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp
lldb/source/Plugins/SymbolFile/DWARF/DWARFAbbreviationDeclaration.cpp
lldb/source/Plugins/SymbolFile/DWARF/DWARFUnit.cpp
lldb/source/Plugins/SymbolFile/DWARF/ManualDWARFIndex.cpp