[PATCH] D22411: bugpoint: add flag -verbose-errors
Sebastian Pop via llvm-commits
llvm-commits at lists.llvm.org
Fri Jul 15 16:22:39 PDT 2016
This revision was automatically updated to reflect the committed changes.
Closed by commit rL275646: bugpoint: add flag -verbose-errors (authored by spop).
Changed prior to commit:
https://reviews.llvm.org/D22411?vs=64196&id=64211#toc
Repository:
rL LLVM
https://reviews.llvm.org/D22411
Files:
llvm/trunk/docs/CommandGuide/bugpoint.rst
llvm/trunk/tools/bugpoint/CrashDebugger.cpp
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<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,7 +908,10 @@
std::string Error;
BD.compileProgram(M, &Error);
if (!Error.empty()) {
- errs() << "<crash>\n";
+ if (VerboseErrors)
+ errs() << Error << "\n";
+ else
+ errs() << "<crash>\n";
return true; // Tool is still crashing.
}
errs() << '\n';
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 "<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
-----------
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D22411.64211.patch
Type: text/x-patch
Size: 1595 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160715/243691b6/attachment.bin>
More information about the llvm-commits
mailing list