[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
This commit is contained in:
Kazu Hirata 2022-11-25 12:14:22 -08:00
parent 1df47dbe13
commit d6e3dbabf9
1 changed files with 4 additions and 3 deletions

View File

@ -17,6 +17,7 @@
#include "llvm/Support/FileOutputBuffer.h"
#include "llvm/Support/MathExtras.h"
#include "llvm/Support/MemoryBuffer.h"
#include <optional>
using llvm::object::ELFObjectFile;
@ -31,13 +32,13 @@ namespace ifs {
struct DynamicEntries {
uint64_t StrTabAddr = 0;
uint64_t StrSize = 0;
Optional<uint64_t> SONameOffset;
std::optional<uint64_t> SONameOffset;
std::vector<uint64_t> NeededLibNames;
// Symbol table:
uint64_t DynSymAddr = 0;
// Hash tables:
Optional<uint64_t> ElfHash;
Optional<uint64_t> GnuHash;
std::optional<uint64_t> ElfHash;
std::optional<uint64_t> GnuHash;
};
/// This initializes an ELF file header with information specific to a binary