[Lldb-commits] [PATCH] D47470: AppleDWARFIndex: Get function method-ness directly from debug info

Greg Clayton via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Tue May 29 09:16:47 PDT 2018


clayborg added inline comments.


================
Comment at: source/Plugins/SymbolFile/DWARF/AppleDWARFIndex.cpp:153
+    return true;
+  bool looking_for_methods = name_type_mask & eFunctionNameTypeMethod;
+  return looking_for_methods == die.IsMethod();
----------------
move up to line 150 and use this variable in the if statement instead of repeating "name_type_mask & eFunctionNameTypeMethod" twice?


================
Comment at: source/Plugins/SymbolFile/DWARF/DWARFDIE.cpp:222
+    return true;
+  return GetReferencedDIE(DW_AT_specification)
+      .GetParent()
----------------
I can never remember when a DW_AT_abstract_origin might be used. Might be nice to have a DWARFDIE method:

```
DWARFDIE DWARFDIE::GetAbstractOriginOrSpecification();
```
this would return either the the DW_AT_specification or the DW_AT_abstract_origin. If we go that route the this coce would become:

```
GetAbstractOriginOrSpecification().GetParent().IsStructUnionOrClass();
```



https://reviews.llvm.org/D47470





More information about the lldb-commits mailing list