Ejemplo n.º 1
0
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;
}
Ejemplo n.º 2
0
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.
  }
}
Ejemplo n.º 3
0
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;
}