From 4e58c88c2d61c3aa80fd61b2ed911c4214a2f1c4 Mon Sep 17 00:00:00 2001 From: Kazu Hirata Date: Sat, 26 Nov 2022 18:36:55 -0800 Subject: [PATCH] [dsymutil] Use std::optional in DwarfLinkerForBinary.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 --- llvm/tools/dsymutil/DwarfLinkerForBinary.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/llvm/tools/dsymutil/DwarfLinkerForBinary.cpp b/llvm/tools/dsymutil/DwarfLinkerForBinary.cpp index b7cc05a..208c2a7 100644 --- a/llvm/tools/dsymutil/DwarfLinkerForBinary.cpp +++ b/llvm/tools/dsymutil/DwarfLinkerForBinary.cpp @@ -94,6 +94,7 @@ #include #include #include +#include #include #include #include @@ -506,7 +507,7 @@ void DwarfLinkerForBinary::copySwiftReflectionMetadata( if (auto *MO = dyn_cast(OF->getBinary())) { // Collect the swift reflection sections before emitting them. This is // done so we control the order they're emitted. - std::array, + std::array, Swift5ReflectionSectionKind::last + 1> SwiftSections; for (auto &Section : MO->sections()) { -- 2.7.4