[PATCH] D84191: [llvm-objdump] Symbolize binary addresses for low-noisy asm diff.

David Blaikie via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Aug 17 20:11:49 PDT 2020


dblaikie added inline comments.


================
Comment at: llvm/tools/llvm-objdump/llvm-objdump.cpp:1924
+
+      DenseMap<uint64_t, std::string> AllLabels;
+      if (SymbolizeOperands)
----------------
hoyFB wrote:
> MaskRay wrote:
> > I'll generally refrain from DenseMap on integer types because -1 and -2 cannot be used as DenseMap keys. I'd use unordered_map to avoid gotchas (even if in this context it may work)
> Good to know -1 and -2 are not allowed to be keys with DenseMap. Changed to `unordered_map`.
(FWIW for signed integers, DenseMap's int tombstones are int max and int min - for unsigned integral types it's int max, and int max - 1 - but yeah, if you need the complete range of a 64 bit integer, DenseMap won't suit because of the need for empty/tombstone values)


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D84191



More information about the llvm-commits mailing list