Commit 02c032c6 authored by Camillo Bruni's avatar Camillo Bruni Committed by Commit Bot

[CSA] Improve error mesage when re-binding the same label

Change-Id: I102558ee4fac29e5bc259117129a47632cc8bd58
Reviewed-on: https://chromium-review.googlesource.com/505508Reviewed-by: 's avatarJaroslav Sevcik <jarin@chromium.org>
Commit-Queue: Camillo Bruni <cbruni@chromium.org>
Cr-Commit-Position: refs/heads/master@{#45311}
parent f8a6c6c4
......@@ -996,7 +996,13 @@ void CodeAssemblerLabel::MergeVariables() {
#if DEBUG
void CodeAssemblerLabel::Bind(AssemblerDebugInfo debug_info) {
DCHECK(!bound_);
if (bound_) {
std::stringstream str;
str << "Cannot bind the same label twice:"
<< "\n# current: " << debug_info
<< "\n# previous: " << *label_->block();
FATAL(str.str().c_str());
}
state_->raw_assembler_->Bind(label_, debug_info);
UpdateVariablesAfterBind();
}
......
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