diff options
author | Yevgeny Rouban <yrouban@azul.com> | 2022-02-27 19:56:31 +0700 |
---|---|---|
committer | Yevgeny Rouban <yrouban@azul.com> | 2022-02-27 20:57:28 +0700 |
commit | 7fb39fb6d6665cd469557b43eb205cc32b0a7ac3 (patch) | |
tree | 2719b1f424e6ba37057086df87fb28d1e8ae7740 /llvm/unittests/Support/UnicodeTest.cpp | |
parent | 9bc866cc6f4fa01186e5ec8306d6b542962b27e9 (diff) | |
download | llvm-7fb39fb6d6665cd469557b43eb205cc32b0a7ac3.zip llvm-7fb39fb6d6665cd469557b43eb205cc32b0a7ac3.tar.gz llvm-7fb39fb6d6665cd469557b43eb205cc32b0a7ac3.tar.bz2 |
[Support] Reset option to its default if its Default field is undefined
opt::setDefaultImpl() is changed to set the option value to the option
type's default if the Default field is not set. This results in option
value reset by Option::reset() or ResetAllOptionOccurrences() even if
the cl::init() is not specified.
Example:
StackOption<std::string> Str("str"); // No cl::init().
Str = "some value";
cl::ResetAllOptionOccurrences();
EXPECT_EQ("", Str); // The Str is reset.
Reviewed By: lattner
Differential Revision: https://reviews.llvm.org/D115433
Diffstat (limited to 'llvm/unittests/Support/UnicodeTest.cpp')
0 files changed, 0 insertions, 0 deletions