Index: llvm/trunk/docs/CommandGuide/bugpoint.rst =================================================================== --- llvm/trunk/docs/CommandGuide/bugpoint.rst +++ llvm/trunk/docs/CommandGuide/bugpoint.rst @@ -176,6 +176,14 @@ **--safe-{int,jit,llc,custom}** option. +**--verbose-errors**\ =\ *{true,false}* + + The default behavior of bugpoint is to print "" when it finds a reduced + test that crashes compilation. This flag prints the output of the crashing + program to stderr. This is useful to make sure it is the same error being + tracked down and not a different error that happens to crash the compiler as + well. Defaults to false. + EXIT STATUS ----------- Index: llvm/trunk/tools/bugpoint/CrashDebugger.cpp =================================================================== --- llvm/trunk/tools/bugpoint/CrashDebugger.cpp +++ llvm/trunk/tools/bugpoint/CrashDebugger.cpp @@ -54,6 +54,9 @@ cl::opt NoNamedMDRM("disable-namedmd-remove", cl::desc("Do not remove global named metadata"), cl::init(false)); + cl::opt VerboseErrors("verbose-errors", + cl::desc("Print the output of crashing program"), + cl::init(false)); } namespace llvm { @@ -905,7 +908,10 @@ std::string Error; BD.compileProgram(M, &Error); if (!Error.empty()) { - errs() << "\n"; + if (VerboseErrors) + errs() << Error << "\n"; + else + errs() << "\n"; return true; // Tool is still crashing. } errs() << '\n';