[PATCH] D70930: [llvm-objcopy][WebAssembly] Initial support for wasm in llvm-objcopy
Alexander Shaposhnikov via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Dec 12 11:42:31 PST 2019
alexshap added inline comments.
================
Comment at: llvm/tools/llvm-objcopy/wasm/Object.h:21
+
+class Section {
+public:
----------------
Sorry for the delays with code review, I'll try to catch up on all the diffs in my backlog soon.
I'm not an expert in WASM format, so please take my comments with a grain of salt.
Okay, what would you say to the following approach ?
struct Section {
uint8_t Type;
StringRef Name;
ArrayRef<uint8_t> Content;
};
If in the future we need to add new sections with some new content - we can use a StringSaver NewSectionsContents
(i.e. it can be a field of the class Object) which would be responsible for holding the corresponding buffers (which are not owned by the input object)).
Looks like in this case the code would be a tiny bit cleaner / less verbose.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D70930/new/
https://reviews.llvm.org/D70930
More information about the llvm-commits
mailing list