[PATCH] D158458: [AsmPrinter][DebugInfo] Create EntryValue mode for DbgVariable

Adrian Prantl via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Aug 21 15:59:10 PDT 2023


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

LGTM, some minor nitpicks inside.



================
Comment at: llvm/lib/CodeGen/AsmPrinter/DwarfDebug.h:113
+
+    // Operator enabling sorting based on fragment offset.
+    bool operator<(const EntryValueInfo &Other) const {
----------------
///


================
Comment at: llvm/lib/CodeGen/AsmPrinter/DwarfDebug.h:119
+  private:
+    uint64_t getFragmentOffset() const {
+      std::optional<DIExpression::FragmentInfo> Fragment =
----------------
getFragmentOffsetInBits?


================
Comment at: llvm/lib/CodeGen/AsmPrinter/DwarfDebug.h:126
+
+  std::set<EntryValueInfo> EntryValues;
+
----------------
Why not a `DenseSet<std::pair<MCRegister, DIExpression&>>` or something that inherits from std::pair, then you don't need to define any sorting/hashing methods.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D158458



More information about the llvm-commits mailing list