[Lldb-commits] [PATCH] D47147: DWARFIndex: Reduce duplication in the GetFunctions methods

Greg Clayton via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Mon Jun 4 15:59:28 PDT 2018


clayborg accepted this revision.
clayborg added a comment.
This revision is now accepted and ready to land.

Some if statements simplifications if you want to, but looks good.



================
Comment at: source/Plugins/SymbolFile/DWARF/AppleDWARFIndex.cpp:193-195
+      if (!ObjCLanguage::IsPossibleObjCMethodName(die_name))
+        continue;
+      dies.push_back(die);
----------------
```
if (ObjCLanguage::IsPossibleObjCMethodName(die_name))
  dies.push_back(die);
```


================
Comment at: source/Plugins/SymbolFile/DWARF/ManualDWARFIndex.cpp:448-451
+      if (!SymbolFileDWARF::DIEInDeclContext(&parent_decl_ctx, die))
+        continue; // The containing decl contexts don't match
+
+      dies.push_back(die);
----------------
```
if (SymbolFileDWARF::DIEInDeclContext(&parent_decl_ctx, die))
  dies.push_back(die);
```


================
Comment at: source/Plugins/SymbolFile/DWARF/ManualDWARFIndex.cpp:464
+
+      dies.push_back(die);
     }
----------------
```
if (die)
  dies.push_back(die);
```


================
Comment at: source/Plugins/SymbolFile/DWARF/ManualDWARFIndex.cpp:474-477
+      if (!die)
+        continue;
+
+      dies.push_back(die);
----------------
```
if (die)
  dies.push_back(die);
```


https://reviews.llvm.org/D47147





More information about the lldb-commits mailing list