diff options
author | jgravelle-google <jgravelle@google.com> | 2017-03-16 13:57:26 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-03-16 13:57:26 -0700 |
commit | 5079b89949d4c5c5c7b6d29658d058db459be9e6 (patch) | |
tree | 935834b5ef9ddcc48bac02c84f15f40a986b0eeb /src | |
parent | a407b989ecc0c57ed4862ceaaa25acb0a41af63c (diff) | |
download | binaryen-5079b89949d4c5c5c7b6d29658d058db459be9e6.tar.gz binaryen-5079b89949d4c5c5c7b6d29658d058db459be9e6.tar.bz2 binaryen-5079b89949d4c5c5c7b6d29658d058db459be9e6.zip |
Skip .size directives that follow .import_global directives (#949)
Diffstat (limited to 'src')
-rw-r--r-- | src/s2wasm.h | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/s2wasm.h b/src/s2wasm.h index 31632c9dc..9c50aeedd 100644 --- a/src/s2wasm.h +++ b/src/s2wasm.h @@ -509,8 +509,14 @@ class S2WasmBuilder { else if (match("data")) {} else if (match("ident")) skipToEOL(); else if (match("section")) parseToplevelSection(); - else if (match("align") || match("p2align") || match("import_global")) + else if (match("align") || match("p2align")) skipToEOL(); + else if (match("import_global")) { skipToEOL(); + skipWhitespace(); + if (match(".size")) { + skipToEOL(); + } + } else if (match("globl")) parseGlobl(); else if (match("functype")) parseFuncType(); else skipObjectAlias(true); |