[Mlir-commits] [mlir] [mlir] Add support for parsing nested PassPipelineOptions (PR #101118)

River Riddle llvmlistbot at llvm.org
Tue Jul 30 09:22:45 PDT 2024


================
@@ -66,7 +66,15 @@ struct TestOptionsPass
     Option<Enum> enumOption{
         *this, "enum", llvm::cl::desc("Example enum option"),
         llvm::cl::values(clEnumValN(0, "zero", "Example zero value"),
-                         clEnumValN(1, "one", "Example one value"))};
+                         clEnumValN(1, "one", "Example one value"),
+                         clEnumValN(2, "two", "Example two value"))};
+
+    Options() = default;
+    Options(const Options &rhs) { *this = rhs; }
+    Options &operator=(const Options &rhs) {
+      copyOptionValuesFrom(rhs);
+      return *this;
+    }
----------------
River707 wrote:

Can you add these to the PassPipelineOptions<T> base class?

https://github.com/llvm/llvm-project/pull/101118


More information about the Mlir-commits mailing list