[PATCH] D86867: [obj2yaml] Add support for dumping the .debug_str section.

Xing GUO via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Sep 3 01:37:59 PDT 2020


Higuoxing added inline comments.


================
Comment at: llvm/tools/obj2yaml/elf2yaml.cpp:209
+      if (SecName == "debug_str")
+        return !(RawSec->EntSize && (uint64_t)*RawSec->EntSize == 1) ||
+               RawSec->Flags.getValueOr(ELFYAML::ELF_SHF(0)) !=
----------------
jhenderson wrote:
> I'm struggling with this code. Under what circumstances can `RawSec->EntSize` by None here? Similar question for the Flags below.
I check it because `EntSize` and `Flags` are `Optional` values. It seems that you are right, I cannot create a test case that make them `None`. Could you please tell me why they cannot be `None` here?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D86867



More information about the llvm-commits mailing list