diff options
author | Benjamin Bouvier <public@benj.me> | 2016-10-13 19:41:59 +0200 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2016-10-13 10:41:59 -0700 |
commit | 95d00d699c9e05b8a04885d019a09d8d2eebd0b5 (patch) | |
tree | 7a8426152e015ba1f614f5492472e0d0084d81f6 /src/passes/Print.cpp | |
parent | b4d7c60d82fc336e401026e7ba6dd67138259ae2 (diff) | |
download | binaryen-95d00d699c9e05b8a04885d019a09d8d2eebd0b5.tar.gz binaryen-95d00d699c9e05b8a04885d019a09d8d2eebd0b5.tar.bz2 binaryen-95d00d699c9e05b8a04885d019a09d8d2eebd0b5.zip |
Don't create a memory section for an imported memory; fixes #772 (#773)
Diffstat (limited to 'src/passes/Print.cpp')
-rw-r--r-- | src/passes/Print.cpp | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/src/passes/Print.cpp b/src/passes/Print.cpp index 075d013e5..c6fca0256 100644 --- a/src/passes/Print.cpp +++ b/src/passes/Print.cpp @@ -649,14 +649,7 @@ struct PrintSExpression : public Visitor<PrintSExpression> { } void visitMemory(Memory* curr) { // if memory wasn't imported, declare it - bool found = false; - for (auto& import : currModule->imports) { - if (import->kind == ExternalKind::Memory) { - found = true; - break; - } - } - if (!found) { + if (!curr->imported) { doIndent(o, indent); printMemoryHeader(curr); o << '\n'; |