[llvm] ba3d808 - [llvm-gsymutil] Use std::optional in llvm-gsymutil.cpp (NFC)
Kazu Hirata via llvm-commits
llvm-commits at lists.llvm.org
Sat Dec 10 08:31:20 PST 2022
Author: Kazu Hirata
Date: 2022-12-10T08:31:15-08:00
New Revision: ba3d808feedaa7f31750d8bc02754e15b372c868
URL: https://github.com/llvm/llvm-project/commit/ba3d808feedaa7f31750d8bc02754e15b372c868
DIFF: https://github.com/llvm/llvm-project/commit/ba3d808feedaa7f31750d8bc02754e15b372c868.diff
LOG: [llvm-gsymutil] Use std::optional in llvm-gsymutil.cpp (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
Added:
Modified:
llvm/tools/llvm-gsymutil/llvm-gsymutil.cpp
Removed:
################################################################################
diff --git a/llvm/tools/llvm-gsymutil/llvm-gsymutil.cpp b/llvm/tools/llvm-gsymutil/llvm-gsymutil.cpp
index be131d41b3e76..d409493ce07e7 100644
--- a/llvm/tools/llvm-gsymutil/llvm-gsymutil.cpp
+++ b/llvm/tools/llvm-gsymutil/llvm-gsymutil.cpp
@@ -41,6 +41,7 @@
#include "llvm/DebugInfo/GSYM/InlineInfo.h"
#include "llvm/DebugInfo/GSYM/LookupResult.h"
#include "llvm/DebugInfo/GSYM/ObjectFileTransformer.h"
+#include <optional>
using namespace llvm;
using namespace gsym;
@@ -480,7 +481,7 @@ int main(int argc, char const *argv[]) {
std::string InputLine;
std::string CurrentGSYMPath;
- llvm::Optional<Expected<GsymReader>> CurrentGsym;
+ std::optional<Expected<GsymReader>> CurrentGsym;
while (std::getline(std::cin, InputLine)) {
// Strip newline characters.
More information about the llvm-commits
mailing list