summaryrefslogtreecommitdiff
path: root/src/wasm/wasm-stack.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/wasm/wasm-stack.cpp')
-rw-r--r--src/wasm/wasm-stack.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/wasm/wasm-stack.cpp b/src/wasm/wasm-stack.cpp
index f86fb58b9..61f59c76a 100644
--- a/src/wasm/wasm-stack.cpp
+++ b/src/wasm/wasm-stack.cpp
@@ -3096,8 +3096,8 @@ ModuleStackIR::ModuleStackIR(Module& wasm, const PassOptions& options)
}) {}
void StackIRToBinaryWriter::write() {
- if (func->prologLocation.size()) {
- parent.writeDebugLocation(*func->prologLocation.begin());
+ if (func->prologLocation) {
+ parent.writeDebugLocation(*func->prologLocation);
}
writer.mapLocalsAndEmitHeader();
// Stack to track indices of catches within a try
@@ -3158,8 +3158,8 @@ void StackIRToBinaryWriter::write() {
}
// Indicate the debug location corresponding to the end opcode that
// terminates the function code.
- if (func->epilogLocation.size()) {
- parent.writeDebugLocation(*func->epilogLocation.begin());
+ if (func->epilogLocation) {
+ parent.writeDebugLocation(*func->epilogLocation);
} else {
// The end opcode has no debug location.
parent.writeNoDebugLocation();