summaryrefslogtreecommitdiff
path: root/flang/unittests
diff options
context:
space:
mode:
authorKazu Hirata <kazu@google.com>2023-01-02 19:13:11 -0800
committerKazu Hirata <kazu@google.com>2023-01-02 19:13:11 -0800
commit55916758d754227888293501de87bc90b7328108 (patch)
tree82e9d0a143dfb719a41542acbf148184627629d7 /flang/unittests
parent5273219e57a85ea360639e21d2fcc8b3edc429f5 (diff)
downloadllvm-55916758d754227888293501de87bc90b7328108.tar.gz
[flang] Use std::optional instead of llvm::Optional (NFC)
This is part of an effort to migrate from llvm::Optional to std::optional: https://discourse.llvm.org/t/deprecating-llvm-optional-x-hasvalue-getvalue-getvalueor/63716
Diffstat (limited to 'flang/unittests')
-rw-r--r--flang/unittests/Optimizer/InternalNamesTest.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/flang/unittests/Optimizer/InternalNamesTest.cpp b/flang/unittests/Optimizer/InternalNamesTest.cpp
index fca8ac16f919..ecfefaabc424 100644
--- a/flang/unittests/Optimizer/InternalNamesTest.cpp
+++ b/flang/unittests/Optimizer/InternalNamesTest.cpp
@@ -8,6 +8,7 @@
#include "flang/Optimizer/Support/InternalNames.h"
#include "gtest/gtest.h"
+#include <optional>
#include <string>
using namespace fir;
@@ -16,7 +17,7 @@ using llvm::StringRef;
struct DeconstructedName {
DeconstructedName(llvm::ArrayRef<std::string> modules,
- llvm::Optional<std::string> host, llvm::StringRef name,
+ std::optional<std::string> host, llvm::StringRef name,
llvm::ArrayRef<std::int64_t> kinds)
: modules{modules.begin(), modules.end()}, host{host}, name{name},
kinds{kinds.begin(), kinds.end()} {}
@@ -31,7 +32,7 @@ struct DeconstructedName {
private:
llvm::SmallVector<std::string> modules;
- llvm::Optional<std::string> host;
+ std::optional<std::string> host;
std::string name;
llvm::SmallVector<std::int64_t> kinds;
};