Commit 27ed9b43 authored by Lei Zhang's avatar Lei Zhang Committed by Commit Bot

Fix MSVC error in WasmModuleBuilder::AddExport().

In a DCHECK inside AddExport(), MSVC gives a C4018 signed/unsigned
mismatch warning. Use a cast to silence this.

Change-Id: Ie388b95b183d2ca3649475fe2206171800673f88
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1697043
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Auto-Submit: Lei Zhang <thestig@chromium.org>
Reviewed-by: 's avatarJakob Kummerow <jkummerow@chromium.org>
Reviewed-by: 's avatarClemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#62636}
parent 03217624
......@@ -306,7 +306,7 @@ void WasmModuleBuilder::MarkStartFunction(WasmFunctionBuilder* function) {
void WasmModuleBuilder::AddExport(Vector<const char> name,
WasmFunctionBuilder* function) {
DCHECK(function->func_index() <= std::numeric_limits<int>::max());
DCHECK_LE(function->func_index(), std::numeric_limits<int>::max());
function_exports_.push_back({name, static_cast<int>(function->func_index())});
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment