summaryrefslogtreecommitdiff
path: root/src/tools/wasm-ctor-eval.cpp
diff options
context:
space:
mode:
authorAshley Nelson <nashley@google.com>2022-09-09 09:55:08 -0700
committerGitHub <noreply@github.com>2022-09-09 09:55:08 -0700
commit15117dc049c6e71b2ea646fb36e034b13dae6435 (patch)
treef61bb9fabdb49ef67dec56a84656c0e78c5006ce /src/tools/wasm-ctor-eval.cpp
parent1e8eb596f82e438216b51972f90e10b4fc13b96a (diff)
downloadbinaryen-15117dc049c6e71b2ea646fb36e034b13dae6435.tar.gz
binaryen-15117dc049c6e71b2ea646fb36e034b13dae6435.tar.bz2
binaryen-15117dc049c6e71b2ea646fb36e034b13dae6435.zip
Changing Fatal() to assert() (#4982)
Replacing Fatal() call sites in src/shell-interface.h & src/tools/wasm-ctor-eval.cpp that were added in the Multi-Memories PR with assert()
Diffstat (limited to 'src/tools/wasm-ctor-eval.cpp')
-rw-r--r--src/tools/wasm-ctor-eval.cpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/tools/wasm-ctor-eval.cpp b/src/tools/wasm-ctor-eval.cpp
index 91128471c..5e9874ccc 100644
--- a/src/tools/wasm-ctor-eval.cpp
+++ b/src/tools/wasm-ctor-eval.cpp
@@ -408,9 +408,7 @@ private:
// TODO: handle unaligned too, see shell-interface
template<typename T> T* getMemory(Address address, Name memoryName) {
auto it = memories.find(memoryName);
- if (it == memories.end()) {
- Fatal() << "memory not found: " << memoryName;
- }
+ assert(it != memories.end());
auto& memory = it->second;
// resize the memory buffer as needed.
auto max = address + sizeof(T);