Show command-line args and features passed into backend in debug output. Approved by Evan Cheng.
llvm-svn: 86797
diff --git a/llvm/lib/Support/CommandLine.cpp b/llvm/lib/Support/CommandLine.cpp
index 626daa2..07900d8 100644
--- a/llvm/lib/Support/CommandLine.cpp
+++ b/llvm/lib/Support/CommandLine.cpp
@@ -17,6 +17,7 @@
//===----------------------------------------------------------------------===//
#include "llvm/Support/CommandLine.h"
+#include "llvm/Support/Debug.h"
#include "llvm/Support/ErrorHandling.h"
#include "llvm/Support/MemoryBuffer.h"
#include "llvm/Support/ManagedStatic.h"
@@ -765,6 +766,11 @@
free(*i);
}
+ DEBUG(errs() << "\nArgs: ";
+ for (int i = 0; i < argc; ++i)
+ errs() << argv[i] << ' ';
+ );
+
// If we had an error processing our arguments, don't let the program execute
if (ErrorParsing) exit(1);
}