diff options
Diffstat (limited to 'llvm/lib/Support/CommandLine.cpp')
-rw-r--r-- | llvm/lib/Support/CommandLine.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/llvm/lib/Support/CommandLine.cpp b/llvm/lib/Support/CommandLine.cpp index abcfa7c..20a2e85 100644 --- a/llvm/lib/Support/CommandLine.cpp +++ b/llvm/lib/Support/CommandLine.cpp @@ -45,6 +45,7 @@ #include "llvm/Support/VirtualFileSystem.h" #include "llvm/Support/raw_ostream.h" #include <cstdlib> +#include <optional> #include <string> using namespace llvm; using namespace cl; @@ -1363,7 +1364,7 @@ bool cl::expandResponseFiles(int Argc, const char *const *Argv, : cl::TokenizeGNUCommandLine; // The environment variable specifies initial options. if (EnvVar) - if (llvm::Optional<std::string> EnvValue = sys::Process::GetEnv(EnvVar)) + if (std::optional<std::string> EnvValue = sys::Process::GetEnv(EnvVar)) Tokenize(*EnvValue, Saver, NewArgv, /*MarkEOLs=*/false); // Command line options can override the environment variable. @@ -1456,7 +1457,7 @@ bool cl::ParseCommandLineOptions(int argc, const char *const *argv, // Parse options from environment variable. if (EnvVar) { - if (llvm::Optional<std::string> EnvValue = + if (std::optional<std::string> EnvValue = sys::Process::GetEnv(StringRef(EnvVar))) TokenizeGNUCommandLine(*EnvValue, Saver, NewArgv); } |