[lld] 900f3f9 - [COFF] llvm::Optional => std::optional
Fangrui Song via llvm-commits
llvm-commits at lists.llvm.org
Sat Dec 3 12:23:45 PST 2022
Author: Fangrui Song
Date: 2022-12-03T20:23:39Z
New Revision: 900f3f9098d03eaf24cffdb22240fe35ea4bfb36
URL: https://github.com/llvm/llvm-project/commit/900f3f9098d03eaf24cffdb22240fe35ea4bfb36
DIFF: https://github.com/llvm/llvm-project/commit/900f3f9098d03eaf24cffdb22240fe35ea4bfb36.diff
LOG: [COFF] llvm::Optional => std::optional
Added:
Modified:
lld/COFF/Driver.cpp
Removed:
################################################################################
diff --git a/lld/COFF/Driver.cpp b/lld/COFF/Driver.cpp
index 84684b09d49f3..6a0c269b67a60 100644
--- a/lld/COFF/Driver.cpp
+++ b/lld/COFF/Driver.cpp
@@ -549,7 +549,7 @@ void LinkerDriver::detectWinSysRoot(const opt::InputArgList &Args) {
// use. Check the environment next, in case we're being invoked from a VS
// command prompt. Failing that, just try to find the newest Visual Studio
// version we can and use its default VC toolchain.
- Optional<StringRef> VCToolsDir, VCToolsVersion, WinSysRoot;
+ std::optional<StringRef> VCToolsDir, VCToolsVersion, WinSysRoot;
if (auto *A = Args.getLastArg(OPT_vctoolsdir))
VCToolsDir = A->getValue();
if (auto *A = Args.getLastArg(OPT_vctoolsversion))
@@ -579,7 +579,7 @@ void LinkerDriver::detectWinSysRoot(const opt::InputArgList &Args) {
Args.getLastArg(OPT_vctoolsdir, OPT_winsysroot);
if (Args.hasArg(OPT_lldignoreenv) || !Process::GetEnv("LIB") ||
Args.getLastArg(OPT_winsdkdir, OPT_winsysroot)) {
- Optional<StringRef> WinSdkDir, WinSdkVersion;
+ std::optional<StringRef> WinSdkDir, WinSdkVersion;
if (auto *A = Args.getLastArg(OPT_winsdkdir))
WinSdkDir = A->getValue();
if (auto *A = Args.getLastArg(OPT_winsdkversion))
More information about the llvm-commits
mailing list