[PATCH] D86202: [yaml2obj] - Make the 'Machine' key optional.

George Rimar via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Aug 19 04:35:35 PDT 2020


grimar added inline comments.


================
Comment at: llvm/include/llvm/ObjectYAML/ELFYAML.h:557
+
+  unsigned getEMachine() const;
 };
----------------
jhenderson wrote:
> You can probably just call this `getMachine`.
Done.


================
Comment at: llvm/test/tools/obj2yaml/ELF/duplicate-symbol-and-section-names.yaml:30
 # CASE1-NEXT:   Type:    ET_REL
-# CASE1-NEXT:   Machine: EM_X86_64
+# CASE1-NEXT:   Machine: EM_NONE
 # CASE1-NEXT: Sections:
----------------
jhenderson wrote:
> Should we (in a separate change) only emit the Machine line if we are not EM_NONE?
I do not expect to see many EM_NONE objects in the wild (I guess it is a very rare case?),
but probably we might want to do it to reduce the possible noise when obj2yaml is used with our objects from test cases,
what is probably will be a much less rare case after this change. So yes, I think it is reasonable.


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

https://reviews.llvm.org/D86202



More information about the llvm-commits mailing list