summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2016-01-13 14:56:53 -0800
committerAlon Zakai <alonzakai@gmail.com>2016-01-13 14:56:53 -0800
commit2a6045447873a92ccb7dfbb6cb7546b715c5dcd5 (patch)
treef5d4b21765709432b72a23f4562e4d3f3b5694f2 /src
parent9a3a2cb975ab171c4f23c5bf5e938db940c707d4 (diff)
downloadbinaryen-2a6045447873a92ccb7dfbb6cb7546b715c5dcd5.tar.gz
binaryen-2a6045447873a92ccb7dfbb6cb7546b715c5dcd5.tar.bz2
binaryen-2a6045447873a92ccb7dfbb6cb7546b715c5dcd5.zip
some function parsing changes in s2wasm, due to upstream llvm
Diffstat (limited to 'src')
-rw-r--r--src/s2wasm.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/s2wasm.h b/src/s2wasm.h
index c192effc2..cc38dd276 100644
--- a/src/s2wasm.h
+++ b/src/s2wasm.h
@@ -360,7 +360,11 @@ private:
else if (match("data")) {}
else if (match("ident")) {}
else if (match("section") || match("align")) s = strchr(s, '\n');
- else if (match("globl")) parseGlobl();
+ else if (match("Lfunc_end")) {
+ // skip the next line, which has a .size we can ignore
+ s = strstr(s, ".size");
+ s = strchr(s, '\n');
+ } else if (match("globl")) parseGlobl();
else abort_on("process");
}
}
@@ -882,6 +886,8 @@ private:
s++;
s = strchr(s, '\n');
break; // the function is done
+ } else if (match(".endfunc")) {
+ break; // the function is done
} else {
abort_on("function element");
}