aboutsummaryrefslogtreecommitdiff
path: root/llvm/tools/llvm-reduce/llvm-reduce.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/tools/llvm-reduce/llvm-reduce.cpp')
-rw-r--r--llvm/tools/llvm-reduce/llvm-reduce.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/llvm/tools/llvm-reduce/llvm-reduce.cpp b/llvm/tools/llvm-reduce/llvm-reduce.cpp
index 0499d496..5a00ef0 100644
--- a/llvm/tools/llvm-reduce/llvm-reduce.cpp
+++ b/llvm/tools/llvm-reduce/llvm-reduce.cpp
@@ -15,6 +15,7 @@
//===----------------------------------------------------------------------===//
#include "DeltaManager.h"
+#include "TestRunner.h"
#include "llvm/ADT/SmallString.h"
#include "llvm/IR/LLVMContext.h"
#include "llvm/IR/Verifier.h"
@@ -35,6 +36,11 @@ static cl::opt<bool> Help("h", cl::desc("Alias for -help"), cl::Hidden,
static cl::opt<bool> Version("v", cl::desc("Alias for -version"), cl::Hidden,
cl::cat(Options));
+static cl::opt<bool>
+ PrintDeltaPasses("print-delta-passes",
+ cl::desc("Print list of delta passes, passable to "
+ "--delta-passes as a comma separated list"));
+
static cl::opt<std::string> InputFilename(cl::Positional, cl::Required,
cl::desc("<input llvm ll/bc file>"),
cl::cat(Options));
@@ -101,6 +107,11 @@ int main(int Argc, char **Argv) {
cl::ParseCommandLineOptions(Argc, Argv, "LLVM automatic testcase reducer.\n");
+ if (PrintDeltaPasses) {
+ printDeltaPasses(errs());
+ return 0;
+ }
+
LLVMContext Context;
std::unique_ptr<Module> OriginalProgram =
parseInputFile(InputFilename, Context);