Skip to content

Commit

Permalink
set direct meter name in bmv2 json properly
Browse files Browse the repository at this point in the history
  • Loading branch information
Chris Dodd committed Nov 2, 2016
1 parent c3bdd1f commit 8f295e6
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions backends/bmv2/jsonconverter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1264,9 +1264,7 @@ JsonConverter::convertTable(const CFG::TableNode* node, Util::JsonArray* counter
meterMap.setSize(decl, size);
BUG_CHECK(decl->is<IR::Declaration_Instance>(),
"%1%: expected an instance", decl->getNode());
cstring dmname = nameFromAnnotation(
decl->to<IR::Declaration_Instance>()->annotations, decl->getName());
result->emplace("direct_meters", dmname);
result->emplace("direct_meters", decl->getName());
}
} else {
::error("%1%: expected a Boolean", timeout);
Expand Down

0 comments on commit 8f295e6

Please sign in to comment.