[PATCH] D126509: [Objcopy][Wasm] Allow selecting known sections by name

Derek Schuff via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu May 26 17:35:46 PDT 2022


dschuff added inline comments.


================
Comment at: llvm/include/llvm/BinaryFormat/Wasm.h:475
 std::string relocTypetoString(uint32_t type);
+llvm::StringRef sectionTypeToString(uint32_t type);
 bool relocTypeHasAddend(uint32_t type);
----------------
sbc100 wrote:
> Seems like we should be consistent here with std::string vs StringRef.
agreed, although I think `StringRef` is probably the better one to use if we can. Also it looks like we have duplicate `relocTypetoString`s too, so maybe that's better cleaned up in a separate CL.


================
Comment at: llvm/lib/BinaryFormat/Wasm.cpp:74
+  }
+}
+
----------------
sbc100 wrote:
> Looks like should be able to delete the copy of this function from `lld/wasm/OutputSections.cpp`?
> 
> And what looks like another version in `WasmObjectFile::getSectionName`
oops yes, I saw the one in lld but forgot to remove it. (didn't see the one in WasmObjectFile)


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D126509



More information about the llvm-commits mailing list