summaryrefslogtreecommitdiffstats
path: root/lld/wasm/InputChunks.h
diff options
context:
space:
mode:
Diffstat (limited to 'lld/wasm/InputChunks.h')
-rw-r--r--lld/wasm/InputChunks.h8
1 files changed, 5 insertions, 3 deletions
diff --git a/lld/wasm/InputChunks.h b/lld/wasm/InputChunks.h
index 5b9b885f3c9..baff5e7834f 100644
--- a/lld/wasm/InputChunks.h
+++ b/lld/wasm/InputChunks.h
@@ -176,20 +176,22 @@ protected:
// Represents a single Wasm Section within an input file.
class InputSection : public InputChunk {
public:
- InputSection(const WasmSection &S, ObjFile *F);
+ InputSection(const WasmSection &S, ObjFile *F)
+ : InputChunk(F, InputChunk::Section), Section(S) {
+ assert(Section.Type == llvm::wasm::WASM_SEC_CUSTOM);
+ }
StringRef getName() const override { return Section.Name; }
uint32_t getComdat() const override { return UINT32_MAX; }
protected:
- ArrayRef<uint8_t> data() const override { return Payload; }
+ ArrayRef<uint8_t> data() const override { return Section.Content; }
// Offset within the input section. This is only zero since this chunk
// type represents an entire input section, not part of one.
uint32_t getInputSectionOffset() const override { return 0; }
const WasmSection &Section;
- ArrayRef<uint8_t> Payload;
};
} // namespace wasm
OpenPOWER on IntegriCloud