[PATCH] D43097: [WebAssembly] Allow for the creation of user-defined custom sections
Nicholas Wilson via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Feb 9 09:45:30 PST 2018
ncw added inline comments.
================
Comment at: lib/MC/WasmObjectWriter.cpp:992
SmallVector<WasmDataSegment, 4> DataSegments;
+ std::vector<std::pair<StringRef, const SmallVectorImpl<char>*>>
+ CustomSections;
----------------
sunfish wrote:
> sbc100 wrote:
> > would ArrayRef<char> ? Or ArrayRef<uint8_t> work better here?
> I initially did exactly that, with ArrayRef and uint8_t, however writeBytes takes a SmallVectorImpl<char>.
It could be a bit less ugly with a typedef/"using=" for the std::pair (and in fact for all these vectors here which have rather long types)
Repository:
rL LLVM
https://reviews.llvm.org/D43097
More information about the llvm-commits
mailing list