aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/MC/WasmObjectWriter.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/MC/WasmObjectWriter.cpp')
-rw-r--r--llvm/lib/MC/WasmObjectWriter.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/MC/WasmObjectWriter.cpp b/llvm/lib/MC/WasmObjectWriter.cpp
index c123d80..63bce85 100644
--- a/llvm/lib/MC/WasmObjectWriter.cpp
+++ b/llvm/lib/MC/WasmObjectWriter.cpp
@@ -1062,7 +1062,7 @@ uint32_t WasmObjectWriter::writeCodeSection(const MCAssembler &Asm,
for (const WasmFunction &Func : Functions) {
auto *FuncSection = static_cast<MCSectionWasm *>(Func.Section);
- int64_t Size = Layout.getSectionAddressSize(FuncSection);
+ int64_t Size = Asm.getSectionAddressSize(*FuncSection);
encodeULEB128(Size, W->OS);
FuncSection->setSectionOffset(W->OS.tell() - Section.ContentsOffset);
Asm.writeSectionData(W->OS, FuncSection);