Skip to content

Commit

Permalink
Assert success in MessageToJsonString
Browse files Browse the repository at this point in the history
  • Loading branch information
adamjseitz authored and jdorn-gt committed Aug 23, 2024
1 parent ca4236d commit f30709e
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions src/IR.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -247,12 +247,8 @@ void IR::saveJSON(std::ostream& Out) const {
this->toProtobuf(&Message);
std::string S;
auto status = google::protobuf::util::MessageToJsonString(Message, &S);
if (!status.ok()) {
Out << status;
return;
} else {
Out << S;
}
assert(status.ok());
Out << S;
}

ErrorOr<IR*> IR::loadJSON(Context& C, std::istream& In) {
Expand Down

0 comments on commit f30709e

Please sign in to comment.