[PATCH] D125782: [llvm-debuginfo-analyzer] 07 - Compare elements

Carlos Alberto Enciso via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Oct 5 06:14:41 PDT 2022


CarlosAlbertoEnciso added inline comments.


================
Comment at: llvm/include/llvm/DebugInfo/LogicalView/Core/LVCompare.h:75
+  }
+  LVPassTable getPassTable() const { return PassTable; }
+
----------------
probinson wrote:
> Returning a std::vector by value seems inefficient.
Good point. Changed.


================
Comment at: llvm/lib/DebugInfo/LogicalView/Core/LVScope.cpp:1048
+    // Compare full name.
+    if (getFilenameIndex() != Scope->getFilenameIndex())
+      return false;
----------------
probinson wrote:
> This sequence looks a bit strange; if neither one is named, compare the filenames? If that's correct maybe the comment should say "file name" instead of "full name"?
The sequence is correct. That covers the case of unnamed union/struct/class, We use the filename index to determine if they are the same.
Added `// In the case of unnamed union/structure/class compare the file name.`


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

https://reviews.llvm.org/D125782



More information about the llvm-commits mailing list