Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace incorrect BUG_CHECK with BUG #671

Merged
merged 1 commit into from
May 26, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions backends/bmv2/simpleSwitch.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -601,8 +601,8 @@ SimpleSwitch::setPipelineControls(const IR::ToplevelBlock* toplevel,
auto egress = main->getParameterValue(v1model.sw.egress.name);
if (ingress == nullptr || egress == nullptr ||
!ingress->is<IR::ControlBlock>() || !egress->is<IR::ControlBlock>()) {
BUG_CHECK("%1%: main package does not match the expected model %2%",
main, v1model.file.toString());
BUG("%1%: main package does not match the expected model %2%",
main, v1model.file.toString());
}
auto ingress_name = ingress->to<IR::ControlBlock>()->container->name;
auto egress_name = egress->to<IR::ControlBlock>()->container->name;
Expand All @@ -622,8 +622,8 @@ SimpleSwitch::setNonPipelineControls(const IR::ToplevelBlock* toplevel,
if (verify == nullptr || update == nullptr || deparser == nullptr ||
!verify->is<IR::ControlBlock>() || !update->is<IR::ControlBlock>() ||
!deparser->is<IR::ControlBlock>()) {
BUG_CHECK("%1%: main package does not match the expected model %2%",
main, v1model.file.toString());
BUG("%1%: main package does not match the expected model %2%",
main, v1model.file.toString());
}
controls->emplace(verify->to<IR::ControlBlock>()->container->name);
controls->emplace(update->to<IR::ControlBlock>()->container->name);
Expand All @@ -636,8 +636,8 @@ SimpleSwitch::setUpdateChecksumControls(const IR::ToplevelBlock* toplevel,
auto main = toplevel->getMain();
auto update = main->getParameterValue(v1model.sw.update.name);
if (update == nullptr || !update->is<IR::ControlBlock>()) {
BUG_CHECK("%1%: main package does not match the expected model %2%",
main, v1model.file.toString());
BUG("%1%: main package does not match the expected model %2%",
main, v1model.file.toString());
}
controls->emplace(update->to<IR::ControlBlock>()->container->name);
}
Expand All @@ -648,8 +648,8 @@ SimpleSwitch::setDeparserControls(const IR::ToplevelBlock* toplevel,
auto main = toplevel->getMain();
auto deparser = main->getParameterValue(v1model.sw.deparser.name);
if (deparser == nullptr || !deparser->is<IR::ControlBlock>()) {
BUG_CHECK("%1%: main package does not match the expected model %2%",
main, v1model.file.toString());
BUG("%1%: main package does not match the expected model %2%",
main, v1model.file.toString());
}
controls->emplace(deparser->to<IR::ControlBlock>()->container->name);
}
Expand Down