[Lldb-commits] [lldb] [SymbolFileDWARF][NFC] Remove duplicated code checking for type tags (PR #74773)
Michael Buch via lldb-commits
lldb-commits at lists.llvm.org
Thu Dec 7 14:23:39 PST 2023
================
@@ -2947,29 +2951,18 @@ TypeSP SymbolFileDWARF::FindCompleteObjCDefinitionTypeForDIE(
m_index->GetCompleteObjCClass(
type_name, must_be_implementation, [&](DWARFDIE type_die) {
- bool try_resolving_type = false;
-
// Don't try and resolve the DIE we are looking for with the DIE
// itself!
- if (type_die != die) {
- switch (type_die.Tag()) {
- case DW_TAG_class_type:
- case DW_TAG_structure_type:
- try_resolving_type = true;
- break;
- default:
- break;
- }
- }
- if (!try_resolving_type)
+ if (type_die == die || !IsTypeTag(type_die.Tag()))
return true;
if (must_be_implementation &&
- type_die.Supports_DW_AT_APPLE_objc_complete_type())
- try_resolving_type = type_die.GetAttributeValueAsUnsigned(
+ type_die.Supports_DW_AT_APPLE_objc_complete_type()) {
+ bool try_resolving_type = type_die.GetAttributeValueAsUnsigned(
----------------
Michael137 wrote:
```suggestion
bool const try_resolving_type = type_die.GetAttributeValueAsUnsigned(
```
https://github.com/llvm/llvm-project/pull/74773
More information about the lldb-commits
mailing list