aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/ObjCopy/wasm/WasmReader.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/ObjCopy/wasm/WasmReader.cpp')
-rw-r--r--llvm/lib/ObjCopy/wasm/WasmReader.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/ObjCopy/wasm/WasmReader.cpp b/llvm/lib/ObjCopy/wasm/WasmReader.cpp
index 6e7d8b5591c9..578e78955af3 100644
--- a/llvm/lib/ObjCopy/wasm/WasmReader.cpp
+++ b/llvm/lib/ObjCopy/wasm/WasmReader.cpp
@@ -22,8 +22,8 @@ Expected<std::unique_ptr<Object>> Reader::create() const {
Obj->Sections.reserve(WasmObj.getNumSections());
for (const SectionRef &Sec : WasmObj.sections()) {
const WasmSection &WS = WasmObj.getWasmSection(Sec);
- Obj->Sections.push_back(
- {static_cast<uint8_t>(WS.Type), WS.Name, WS.Content});
+ Obj->Sections.push_back({static_cast<uint8_t>(WS.Type),
+ WS.HeaderSecSizeEncodingLen, WS.Name, WS.Content});
// Give known sections standard names to allow them to be selected. (Custom
// sections already have their names filled in by the parser).
Section &ReaderSec = Obj->Sections.back();