From a654dc03933af4e6ff5f3b992300474263afbc26 Mon Sep 17 00:00:00 2001 From: Dominic Chen Date: Thu, 23 Jun 2016 13:12:54 -0700 Subject: make assertion error more useful (#597) --- src/wasm-linker.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/wasm-linker.cpp') diff --git a/src/wasm-linker.cpp b/src/wasm-linker.cpp index e6a0a0514..e89c324b4 100644 --- a/src/wasm-linker.cpp +++ b/src/wasm-linker.cpp @@ -135,7 +135,7 @@ void Linker::layout() { if (relocation->kind == LinkerObject::Relocation::kData) { const auto& symbolAddress = staticAddresses.find(name); - assert(symbolAddress != staticAddresses.end()); + if (symbolAddress == staticAddresses.end()) Fatal() << "Unknown relocation: " << name << '\n'; *(relocation->data) = symbolAddress->second + relocation->addend; if (debug) std::cerr << " ==> " << *(relocation->data) << '\n'; } else { -- cgit v1.2.3