diff options
author | Alon Zakai <alonzakai@gmail.com> | 2016-04-20 18:39:19 -0700 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2016-04-20 18:39:19 -0700 |
commit | 34a74e9e72d2a572bb8ae9f820f4b553fa06632a (patch) | |
tree | 245a75228bcda9d9ab627186c7252454fcb9ac70 /src/passes/Print.cpp | |
parent | c2d9d476b853212e96f301106cf00ceb19baefca (diff) | |
parent | 7ce2aefd8e14d6507fbe4abdcbbba9b0507944f0 (diff) | |
download | binaryen-34a74e9e72d2a572bb8ae9f820f4b553fa06632a.tar.gz binaryen-34a74e9e72d2a572bb8ae9f820f4b553fa06632a.tar.bz2 binaryen-34a74e9e72d2a572bb8ae9f820f4b553fa06632a.zip |
Merge pull request #374 from WebAssembly/opts
A few tiny optimization tweaks
Diffstat (limited to 'src/passes/Print.cpp')
-rw-r--r-- | src/passes/Print.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/passes/Print.cpp b/src/passes/Print.cpp index ddeec3dce..59ade1c76 100644 --- a/src/passes/Print.cpp +++ b/src/passes/Print.cpp @@ -68,7 +68,10 @@ struct PrintSExpression : public Visitor<PrintSExpression> { } Name printableLocal(Index index) { - Name name = currFunction->tryLocalName(index); + Name name; + if (currFunction) { + name = currFunction->tryLocalName(index); + } if (!name.is()) { name = Name::fromInt(index); } |