static bool TestForCodeGenCrash(const BugDriver &BD, Module *M) { std::string Error; BD.compileProgram(M, &Error); if (!Error.empty()) { errs() << "<crash>\n"; return true; // Tool is still crashing. } errs() << '\n'; return false; }
static bool TestForCodeGenCrash(BugDriver &BD, Module *M) { try { BD.compileProgram(M); std::cerr << '\n'; return false; } catch (ToolExecutionError &) { std::cerr << "<crash>\n"; return true; // Tool is still crashing. } }
static bool TestForCodeGenCrash(const BugDriver &BD, Module *M) { if (Error E = BD.compileProgram(M)) { if (VerboseErrors) errs() << toString(std::move(E)) << "\n"; else { consumeError(std::move(E)); errs() << "<crash>\n"; } return true; // Tool is still crashing. } errs() << '\n'; return false; }