[PATCH] D41315: [WebAssembly] Output functions individually
Rui Ueyama via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Jan 8 15:59:09 PST 2018
ruiu added inline comments.
================
Comment at: wasm/InputFunction.h:35
+
+ uint32_t getSize() const { return 0; }
+ uint32_t getOutputIndex() const { return OutputIndex.getValue(); };
----------------
IIUC, since wasm functions don't exist in the regular virtual address space, it is always considered zero in size. Defining this function seems a bit pointless to me because functions don't have the notion of "size" at all in webassembly. Can you remove this function?
================
Comment at: wasm/InputFunction.h:46
+ const WasmFunction &Function;
+ int32_t OutputOffset = 0;
+ std::vector<WasmRelocation> Relocations;
----------------
Not sure if I understand this, but is `Offset` a correct term for wasm functions? I think functions have indices, but they don't have output offsets in a normal sense (because they do not exist in the regular address space).
Repository:
rLLD LLVM Linker
https://reviews.llvm.org/D41315
More information about the llvm-commits
mailing list