[llvm] 06944cd - [MachO] Use std::optional in MachOConfig.h (NFC)
Kazu Hirata via llvm-commits
llvm-commits at lists.llvm.org
Sat Dec 10 08:22:42 PST 2022
Author: Kazu Hirata
Date: 2022-12-10T08:22:37-08:00
New Revision: 06944cdc5511dd2aa9276d2e1a5d929a72e65772
URL: https://github.com/llvm/llvm-project/commit/06944cdc5511dd2aa9276d2e1a5d929a72e65772
DIFF: https://github.com/llvm/llvm-project/commit/06944cdc5511dd2aa9276d2e1a5d929a72e65772.diff
LOG: [MachO] Use std::optional in MachOConfig.h (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/include/llvm/ObjCopy/MachO/MachOConfig.h
Removed:
################################################################################
diff --git a/llvm/include/llvm/ObjCopy/MachO/MachOConfig.h b/llvm/include/llvm/ObjCopy/MachO/MachOConfig.h
index c5f861363297..15f9699357f0 100644
--- a/llvm/include/llvm/ObjCopy/MachO/MachOConfig.h
+++ b/llvm/include/llvm/ObjCopy/MachO/MachOConfig.h
@@ -12,6 +12,7 @@
#include "llvm/ADT/DenseMap.h"
#include "llvm/ADT/DenseSet.h"
#include "llvm/ADT/StringRef.h"
+#include <optional>
#include <vector>
namespace llvm {
@@ -27,7 +28,7 @@ struct MachOConfig {
DenseSet<StringRef> RPathsToRemove;
// install-name-tool's id option
- Optional<StringRef> SharedLibId;
+ std::optional<StringRef> SharedLibId;
// Segments to remove if they are empty
DenseSet<StringRef> EmptySegmentsToRemove;
More information about the llvm-commits
mailing list