From d6e3dbabf96b811dba453300c11c6b6db8f0b2cf Mon Sep 17 00:00:00 2001 From: Kazu Hirata Date: Fri, 25 Nov 2022 12:14:22 -0800 Subject: [PATCH] [InterfaceStub] Use std::optional in ELFObjHandler.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/lib/InterfaceStub/ELFObjHandler.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/llvm/lib/InterfaceStub/ELFObjHandler.cpp b/llvm/lib/InterfaceStub/ELFObjHandler.cpp index 13801cd2cbc0..49ed27e265d4 100644 --- a/llvm/lib/InterfaceStub/ELFObjHandler.cpp +++ b/llvm/lib/InterfaceStub/ELFObjHandler.cpp @@ -17,6 +17,7 @@ #include "llvm/Support/FileOutputBuffer.h" #include "llvm/Support/MathExtras.h" #include "llvm/Support/MemoryBuffer.h" +#include using llvm::object::ELFObjectFile; @@ -31,13 +32,13 @@ namespace ifs { struct DynamicEntries { uint64_t StrTabAddr = 0; uint64_t StrSize = 0; - Optional SONameOffset; + std::optional SONameOffset; std::vector NeededLibNames; // Symbol table: uint64_t DynSymAddr = 0; // Hash tables: - Optional ElfHash; - Optional GnuHash; + std::optional ElfHash; + std::optional GnuHash; }; /// This initializes an ELF file header with information specific to a binary