Skip to content

Commit 3d437a2

Browse files
Address a comment.
1 parent ea2d0be commit 3d437a2

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

llvm/include/llvm/Support/CommandLine.h

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1459,18 +1459,16 @@ class opt
14591459
}
14601460
}
14611461

1462-
template <class T> void setDefaultImpl() {
1463-
if constexpr (std::is_assignable_v<T &, T>) {
1462+
void setDefault() override {
1463+
if constexpr (std::is_assignable_v<DataType &, DataType>) {
14641464
const OptionValue<DataType> &V = this->getDefault();
14651465
if (V.hasValue())
14661466
this->setValue(V.getValue());
14671467
else
1468-
this->setValue(T());
1468+
this->setValue(DataType());
14691469
}
14701470
}
14711471

1472-
void setDefault() override { setDefaultImpl<DataType>(); }
1473-
14741472
void done() {
14751473
addArgument();
14761474
Parser.initialize();

0 commit comments

Comments
 (0)