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.cpp18
1 files changed, 18 insertions, 0 deletions
diff --git a/llvm/tools/llvm-reduce/llvm-reduce.cpp b/llvm/tools/llvm-reduce/llvm-reduce.cpp
index bd2db63..71ce0ca5 100644
--- a/llvm/tools/llvm-reduce/llvm-reduce.cpp
+++ b/llvm/tools/llvm-reduce/llvm-reduce.cpp
@@ -100,6 +100,13 @@ static cl::opt<int>
"of delta passes (default=5)"),
cl::init(5), cl::cat(LLVMReduceOptions));
+static cl::opt<bool> TryUseNewDbgInfoFormat(
+ "try-experimental-debuginfo-iterators",
+ cl::desc("Enable debuginfo iterator positions, if they're built in"),
+ cl::init(false));
+
+extern cl::opt<bool> UseNewDbgInfoFormat;
+
static codegen::RegisterCodeGenFlags CGF;
/// Turn off crash debugging features
@@ -143,6 +150,17 @@ int main(int Argc, char **Argv) {
cl::HideUnrelatedOptions({&LLVMReduceOptions, &getColorCategory()});
cl::ParseCommandLineOptions(Argc, Argv, "LLVM automatic testcase reducer.\n");
+ // RemoveDIs debug-info transition: tests may request that we /try/ to use the
+ // new debug-info format, if it's built in.
+#ifdef EXPERIMENTAL_DEBUGINFO_ITERATORS
+ if (TryUseNewDbgInfoFormat) {
+ // If LLVM was built with support for this, turn the new debug-info format
+ // on.
+ UseNewDbgInfoFormat = true;
+ }
+#endif
+ (void)TryUseNewDbgInfoFormat;
+
if (Argc == 1) {
cl::PrintHelpMessage();
return 0;