[Lldb-commits] [PATCH] D62634: Improve DWARF parsing and accessing by 1% to 2%

Pavel Labath via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Thu May 30 00:53:38 PDT 2019


labath accepted this revision.
labath added inline comments.


================
Comment at: source/Plugins/SymbolFile/DWARF/DWARFDebugInfoEntry.cpp:724
     uint32_t curr_depth) const {
-  const DWARFAbbreviationDeclaration *abbrevDecl = nullptr;
-  lldb::offset_t offset = 0;
-  if (cu)
-    abbrevDecl = GetAbbreviationDeclarationPtr(cu, offset);
-
+  auto abbrevDecl = GetAbbreviationDeclarationPtr(cu);
   if (abbrevDecl) {
----------------
It would be better to say `auto *abbrevDecl` here. The extra char doesn't cost much, and it saves one from wondering whether there is anything fancy going on behind the scenes <http://llvm.org/docs/CodingStandards.html#beware-unnecessary-copies-with-auto>


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D62634/new/

https://reviews.llvm.org/D62634





More information about the lldb-commits mailing list