summaryrefslogtreecommitdiffstats
path: root/llvm/lib/MC/WasmObjectWriter.cpp
diff options
context:
space:
mode:
authorSam Clegg <sbc@chromium.org>2018-04-26 18:15:32 +0000
committerSam Clegg <sbc@chromium.org>2018-04-26 18:15:32 +0000
commit6bb5a41f99445a9c067a699028d0d62a89953d12 (patch)
tree59de67347939a02dae85848660ca40e08469b216 /llvm/lib/MC/WasmObjectWriter.cpp
parentb31f91897966d6f14c50ac22de8f8a15bcfc0812 (diff)
downloadbcm5719-llvm-6bb5a41f99445a9c067a699028d0d62a89953d12.tar.gz
bcm5719-llvm-6bb5a41f99445a9c067a699028d0d62a89953d12.zip
[WebAssembly] Add version to object file metadata
Summary: See https://github.com/WebAssembly/tool-conventions/issues/54 Subscribers: jfb, dschuff, jgravelle-google, aheejin, sunfish, llvm-commits Differential Revision: https://reviews.llvm.org/D46069 llvm-svn: 330969
Diffstat (limited to 'llvm/lib/MC/WasmObjectWriter.cpp')
-rw-r--r--llvm/lib/MC/WasmObjectWriter.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/lib/MC/WasmObjectWriter.cpp b/llvm/lib/MC/WasmObjectWriter.cpp
index 0f8a42aacec..0e122708504 100644
--- a/llvm/lib/MC/WasmObjectWriter.cpp
+++ b/llvm/lib/MC/WasmObjectWriter.cpp
@@ -857,8 +857,9 @@ void WasmObjectWriter::writeLinkingMetaDataSection(
const std::map<StringRef, std::vector<WasmComdatEntry>> &Comdats) {
SectionBookkeeping Section;
startCustomSection(Section, "linking");
- SectionBookkeeping SubSection;
+ encodeULEB128(wasm::WasmMetadataVersion, getStream());
+ SectionBookkeeping SubSection;
if (SymbolInfos.size() != 0) {
startSection(SubSection, wasm::WASM_SYMBOL_TABLE);
encodeULEB128(SymbolInfos.size(), getStream());
OpenPOWER on IntegriCloud