Generalize my previous fix for -print-options.
authorAndrew Trick <atrick@apple.com>
Wed, 6 Mar 2013 19:04:56 +0000 (19:04 +0000)
committerAndrew Trick <atrick@apple.com>
Wed, 6 Mar 2013 19:04:56 +0000 (19:04 +0000)
Always print options that differ from their implicit default. At least
for simple option types.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176572 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/Support/CommandLine.h
lib/Transforms/IPO/PassManagerBuilder.cpp

index bf7823ed2798374d0c5d866a4deffa4261ebc4c7..2e84d7b349d1303e7d64fc05bbd4f7263bdfb198 100644 (file)
@@ -1090,7 +1090,7 @@ public:
 
   // Make sure we initialize the value with the default constructor for the
   // type.
-  opt_storage() : Value(DataType()) {}
+  opt_storage() : Value(DataType()), Default(DataType()) {}
 
   template<class T>
   void setValue(const T &V, bool initial = false) {
index 8c0ab78ba4bedda1cfcde3c3ebe076d97bd151bd..47b2b51899c6563349c9bd5977fc4b4b3c65b6a9 100644 (file)
@@ -29,7 +29,7 @@
 using namespace llvm;
 
 static cl::opt<bool>
-RunLoopVectorization("vectorize-loops", cl::init(false),
+RunLoopVectorization("vectorize-loops",
                      cl::desc("Run the Loop vectorization passes"));
 
 static cl::opt<bool>