[llvm] [Support] Simplify setDefaultImpl (NFC) (PR #137528)
Kazu Hirata via llvm-commits
llvm-commits at lists.llvm.org
Sun Apr 27 12:55:30 PDT 2025
================
@@ -1459,18 +1459,16 @@ class opt
}
}
- template <class T, class = std::enable_if_t<std::is_assignable_v<T &, T>>>
- void setDefaultImpl() {
- const OptionValue<DataType> &V = this->getDefault();
- if (V.hasValue())
- this->setValue(V.getValue());
- else
- this->setValue(T());
+ template <class T> void setDefaultImpl() {
----------------
kazutakahirata wrote:
Good idea! Thanks!
https://github.com/llvm/llvm-project/pull/137528
More information about the llvm-commits
mailing list