[PATCH] D63475: [llvm-readobj] Allow --hex-dump/--string-dump to dump multiple sections

George Rimar via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jun 18 02:05:59 PDT 2019


grimar added inline comments.


================
Comment at: tools/llvm-readobj/ObjDumper.cpp:69
+    if (!S.second)
+      reportWarning(formatv("could not find section '{0}'", S.first()).str());
+  for (std::pair<int, bool> S : SecIndices)
----------------
I do not think you can do this, because StringMap iteration order is not guaranteed to be deterministic.


================
Comment at: tools/llvm-readobj/ObjDumper.cpp:70
+      reportWarning(formatv("could not find section '{0}'", S.first()).str());
+  for (std::pair<int, bool> S : SecIndices)
+    if (!S.second)
----------------
The same. You should use `std::map` I think.


Repository:
  rL LLVM

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

https://reviews.llvm.org/D63475





More information about the llvm-commits mailing list