summaryrefslogtreecommitdiff
path: root/src/passes/AlignmentLowering.cpp
diff options
context:
space:
mode:
authorSam Clegg <sbc@chromium.org>2019-12-05 13:09:21 -0600
committerGitHub <noreply@github.com>2019-12-05 13:09:21 -0600
commita28343a33ed28b4d5c83c37e350aceaf09b5246f (patch)
tree084a487cdf79e8025246d2a85d5578c113c9ad51 /src/passes/AlignmentLowering.cpp
parentcbf121df96cfce5038f52ed04f9780e19ed3b762 (diff)
downloadbinaryen-a28343a33ed28b4d5c83c37e350aceaf09b5246f.tar.gz
binaryen-a28343a33ed28b4d5c83c37e350aceaf09b5246f.tar.bz2
binaryen-a28343a33ed28b4d5c83c37e350aceaf09b5246f.zip
Add string parameter to WASM_UNREACHABLE (#2499)
This works more like llvm's unreachable handler in that is preserves information even in release builds.
Diffstat (limited to 'src/passes/AlignmentLowering.cpp')
-rw-r--r--src/passes/AlignmentLowering.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/passes/AlignmentLowering.cpp b/src/passes/AlignmentLowering.cpp
index 05ec2892f..d659fcb69 100644
--- a/src/passes/AlignmentLowering.cpp
+++ b/src/passes/AlignmentLowering.cpp
@@ -103,10 +103,10 @@ struct AlignmentLowering : public WalkerPass<PostWalker<AlignmentLowering>> {
i32),
builder.makeConst(Literal(int32_t(16)))));
} else {
- WASM_UNREACHABLE();
+ WASM_UNREACHABLE("invalid alignment");
}
} else {
- WASM_UNREACHABLE();
+ WASM_UNREACHABLE("invalid size");
}
replaceCurrent(
builder.makeBlock({builder.makeLocalSet(temp, curr->ptr), ret}));
@@ -199,10 +199,10 @@ struct AlignmentLowering : public WalkerPass<PostWalker<AlignmentLowering>> {
builder.makeConst(Literal(int32_t(16)))),
i32));
} else {
- WASM_UNREACHABLE();
+ WASM_UNREACHABLE("invalid alignment");
}
} else {
- WASM_UNREACHABLE();
+ WASM_UNREACHABLE("invalid size");
}
block->finalize();
replaceCurrent(block);