summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/wasm/wasm-emscripten.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/wasm/wasm-emscripten.cpp b/src/wasm/wasm-emscripten.cpp
index caea83302..978afa296 100644
--- a/src/wasm/wasm-emscripten.cpp
+++ b/src/wasm/wasm-emscripten.cpp
@@ -718,6 +718,12 @@ void AsmConstWalker::visitCall(Call* curr) {
if (set) {
assert(set->index == get->index);
arg = set->value;
+ } else {
+ Fatal() << "local.get of unknown in arg0 of call to " << import->base
+ << " (used by EM_ASM* macros) in function "
+ << getFunction()->name
+ << ".\nThis might be caused by aggressive compiler "
+ "transformations. Consider using EM_JS instead.";
}
} else if (auto* value = arg->dynCast<Binary>()) {
// In the dynamic linking case the address of the string constant
@@ -729,7 +735,7 @@ void AsmConstWalker::visitCall(Call* curr) {
} else {
if (!value) {
Fatal() << "Unexpected arg0 type (" << getExpressionName(arg)
- << ") in call to to: " << import->base;
+ << ") in call to: " << import->base;
}
}
}