[PATCH] D63879: [yaml2obj] - Allow overriding sh_offset field from the YAML.

James Henderson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jun 28 04:35:05 PDT 2019


jhenderson added inline comments.


================
Comment at: lib/ObjectYAML/ELFYAML.cpp:915
+
+  assert(!IO.outputting() || !Section.ShOffset.hasValue());
+  IO.mapOptional("ShOffset", Section.ShOffset);
----------------
I'm still not clear why this assert exists specifically for ShOffset, and not for the other fields. It needs commenting or some sort of message needs adding to the assert explaining it.


================
Comment at: test/tools/yaml2obj/elf-override-shoffset.yaml:76
+# RUN: yaml2obj --docnum=3 %s -o %t3
+# RUN: rm -rf %t.txt
+# RUN: od -t x8 -v %t2 > %t.txt
----------------
You don't need this rm here. The first od line will replace its contents.


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

https://reviews.llvm.org/D63879





More information about the llvm-commits mailing list