aboutsummaryrefslogtreecommitdiff
path: root/llvm/tools/llvm-ml/llvm-ml.cpp
diff options
context:
space:
mode:
authorKrzysztof Parzyszek <kparzysz@quicinc.com>2022-12-06 09:53:37 -0800
committerKrzysztof Parzyszek <kparzysz@quicinc.com>2022-12-06 09:56:14 -0800
commit3c255f679c90e332fe0b38b09d5811a64db3f0f6 (patch)
tree824a5b686ddb65c32accffd5e60b394700d61947 /llvm/tools/llvm-ml/llvm-ml.cpp
parentaa6ea6009fc50b02dbf3788ee9fe605081b154f6 (diff)
downloadllvm-3c255f679c90e332fe0b38b09d5811a64db3f0f6.zip
llvm-3c255f679c90e332fe0b38b09d5811a64db3f0f6.tar.gz
llvm-3c255f679c90e332fe0b38b09d5811a64db3f0f6.tar.bz2
Process: convert Optional to std::optional
This applies to GetEnv and FindInEnvPath.
Diffstat (limited to 'llvm/tools/llvm-ml/llvm-ml.cpp')
-rw-r--r--llvm/tools/llvm-ml/llvm-ml.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/tools/llvm-ml/llvm-ml.cpp b/llvm/tools/llvm-ml/llvm-ml.cpp
index 12cd727..49fb429 100644
--- a/llvm/tools/llvm-ml/llvm-ml.cpp
+++ b/llvm/tools/llvm-ml/llvm-ml.cpp
@@ -44,6 +44,7 @@
#include "llvm/Support/ToolOutputFile.h"
#include "llvm/Support/WithColor.h"
#include <ctime>
+#include <optional>
using namespace llvm;
using namespace llvm::opt;
@@ -303,7 +304,7 @@ int main(int Argc, char **Argv) {
std::vector<std::string> IncludeDirs =
InputArgs.getAllArgValues(OPT_include_path);
if (!InputArgs.hasArg(OPT_ignore_include_envvar)) {
- if (llvm::Optional<std::string> IncludeEnvVar =
+ if (std::optional<std::string> IncludeEnvVar =
llvm::sys::Process::GetEnv("INCLUDE")) {
SmallVector<StringRef, 8> Dirs;
StringRef(*IncludeEnvVar)