Skip to content

Commit

Permalink
print out alive2 verifier output if no ub is found for cpp source
Browse files Browse the repository at this point in the history
  • Loading branch information
xzhseh committed Oct 25, 2024
1 parent 8d1584f commit 6cf8431
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
7 changes: 6 additions & 1 deletion src/Printer.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,12 @@ class Printer {
explicit Printer(std::ostream &os) : os(os) {}

/// print verification summary
void print_summary(const llvm_util::Verifier &verifier) const {
void print_summary(const llvm_util::Verifier &verifier,
const std::string &verifier_output = "") const {
if (!verifier_output.empty()) {
os << verifier_output << std::endl;
}

os << BOLD_BLUE << "========================================\n";
os << "SUMMARY:\n"
<< " " << BOLD_GREEN << verifier.num_correct << " correct translations\n"
Expand Down
2 changes: 1 addition & 1 deletion src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ int main(int argc, char *argv[]) {
printer.print_summary(reversed_verifier);
return reversed_verifier.num_errors > 0;
} else {
printer.print_summary(verifier);
printer.print_summary(verifier, verifier_output);
return verifier.num_errors > 0;
}
}

0 comments on commit 6cf8431

Please sign in to comment.