]> granicus.if.org Git - llvm/commit
[WebAssembly] Make segment/size/type directives optional in asm
authorWouter van Oortmerssen <aardappel@gmail.com>
Mon, 4 Feb 2019 18:03:11 +0000 (18:03 +0000)
committerWouter van Oortmerssen <aardappel@gmail.com>
Mon, 4 Feb 2019 18:03:11 +0000 (18:03 +0000)
commit17ad20248897d0275252abb2fe0272c03b2c1d14
treee7a470f3584a9d39493e660dd8c4a4afa939381e
parent93cc33fa0ff4da73bcec44e7fb2f403bbdbce0e4
[WebAssembly] Make segment/size/type directives optional in asm

Summary:
These were "boilerplate" that repeated information already present
in .functype and end_function, that needed to be repeated to Please
the particular way our object writing works, and missing them would
generate errors.

Instead, we generate the information for these automatically so the
user can concern itself with writing more canonical wasm functions
that always work as expected.

Reviewers: dschuff, sbc100

Subscribers: jgravelle-google, aheejin, sunfish, llvm-commits

Differential Revision: https://reviews.llvm.org/D57546

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@353067 91177308-0d34-0410-b5e6-96231b3b80d8
lib/MC/MCParser/WasmAsmParser.cpp
lib/Target/WebAssembly/AsmParser/WebAssemblyAsmParser.cpp
test/MC/WebAssembly/assembler-binary.ll
test/MC/WebAssembly/basic-assembly-errors.s
test/MC/WebAssembly/basic-assembly.s
test/MC/WebAssembly/objdump.s