summaryrefslogtreecommitdiff
path: root/src/wasm-stack.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/wasm-stack.h')
-rw-r--r--src/wasm-stack.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/wasm-stack.h b/src/wasm-stack.h
index 0b72774b6..5858d6f88 100644
--- a/src/wasm-stack.h
+++ b/src/wasm-stack.h
@@ -443,8 +443,13 @@ public:
void emitDelegate(Try* curr) { writer.emitDelegate(curr); }
void emitScopeEnd(Expression* curr) { writer.emitScopeEnd(curr); }
void emitFunctionEnd() {
+ // Indicate the debug location corresponding to the end opcode
+ // that terminates the function code.
if (func->epilogLocation.size()) {
parent.writeDebugLocation(*func->epilogLocation.begin());
+ } else {
+ // The end opcode has no debug location.
+ parent.writeNoDebugLocation();
}
writer.emitFunctionEnd();
}