mirror of
https://github.com/RPCS3/llvm.git
synced 2024-11-27 13:40:43 +00:00
bugpoint: add flag -verbose-errors
The default behavior of bugpoint is to print "<crash>" when it finds a reduced test that crashes compilation. With this flag we now can see the output of the crashing program. 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. Differential Revision: https://reviews.llvm.org/D22411 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@275646 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
7e877ba91a
commit
91aa2f63fb
@ -176,6 +176,14 @@ OPTIONS
|
||||
**--safe-{int,jit,llc,custom}**
|
||||
option.
|
||||
|
||||
**--verbose-errors**\ =\ *{true,false}*
|
||||
|
||||
The default behavior of bugpoint is to print "<crash>" 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
|
||||
-----------
|
||||
|
||||
|
@ -54,6 +54,9 @@ namespace {
|
||||
cl::opt<bool> NoNamedMDRM("disable-namedmd-remove",
|
||||
cl::desc("Do not remove global named metadata"),
|
||||
cl::init(false));
|
||||
cl::opt<bool> VerboseErrors("verbose-errors",
|
||||
cl::desc("Print the output of crashing program"),
|
||||
cl::init(false));
|
||||
}
|
||||
|
||||
namespace llvm {
|
||||
@ -905,6 +908,9 @@ static bool TestForCodeGenCrash(const BugDriver &BD, Module *M) {
|
||||
std::string Error;
|
||||
BD.compileProgram(M, &Error);
|
||||
if (!Error.empty()) {
|
||||
if (VerboseErrors)
|
||||
errs() << Error << "\n";
|
||||
else
|
||||
errs() << "<crash>\n";
|
||||
return true; // Tool is still crashing.
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user