[clang-tools-extra] [llvm] [LLVM][Support] Move default values out of the storage (PR #184581)
Steffen Larsen via llvm-commits
llvm-commits at lists.llvm.org
Thu Mar 5 00:04:47 PST 2026
================
@@ -1722,6 +1722,11 @@ class list : public Option, public list_storage<DataType, StorageClass> {
Parser.initialize();
}
+protected:
+ bool isDefaultAssigned() const { return DefaultAssigned; }
+ void overwriteDefault() { DefaultAssigned = false; }
+ ArrayRef<OptionValue<DataType>> getDefault() const { return Default; }
+
----------------
steffenlarsen wrote:
Personally I am not much for it either, but they were previously defined in `opt_storage` and are used in MLIR's `PassOptions.h` through inheritance. Another option is to make the "Default" members protected. I'm fine with either, but I've added a comment for the current solution if that's the one we want to roll with.
https://github.com/llvm/llvm-project/pull/184581
More information about the llvm-commits
mailing list