[PATCH] D44184: Write DWARF data into WASM object file

Sam Clegg via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Apr 5 18:59:06 PDT 2018


sbc100 added inline comments.


================
Comment at: include/llvm/ObjectYAML/WasmYAML.h:143
   };
+  StringRef SectionName; // present when SectionType is a custom section
 };
----------------
Can we reuse the existing name field here?  i.e. can section symbols avoid storing a name at all?

Or how about dropping SectionType and simply using ElementIndex to store the index of the section as it appears in the file.  That way there is no ambiguity (e.g. when two custom sections have the same name) and you don't need the SectionName field, since it can be looked up by finding the corresponding section.   I know we don't really have section index space yet, but I think it might make sense to use that here.


Repository:
  rL LLVM

https://reviews.llvm.org/D44184





More information about the llvm-commits mailing list