forked from OSchip/llvm-project
[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:
parent
1df47dbe13
commit
d6e3dbabf9
|
@ -17,6 +17,7 @@
|
||||||
#include "llvm/Support/FileOutputBuffer.h"
|
#include "llvm/Support/FileOutputBuffer.h"
|
||||||
#include "llvm/Support/MathExtras.h"
|
#include "llvm/Support/MathExtras.h"
|
||||||
#include "llvm/Support/MemoryBuffer.h"
|
#include "llvm/Support/MemoryBuffer.h"
|
||||||
|
#include <optional>
|
||||||
|
|
||||||
using llvm::object::ELFObjectFile;
|
using llvm::object::ELFObjectFile;
|
||||||
|
|
||||||
|
@ -31,13 +32,13 @@ namespace ifs {
|
||||||
struct DynamicEntries {
|
struct DynamicEntries {
|
||||||
uint64_t StrTabAddr = 0;
|
uint64_t StrTabAddr = 0;
|
||||||
uint64_t StrSize = 0;
|
uint64_t StrSize = 0;
|
||||||
Optional<uint64_t> SONameOffset;
|
std::optional<uint64_t> SONameOffset;
|
||||||
std::vector<uint64_t> NeededLibNames;
|
std::vector<uint64_t> NeededLibNames;
|
||||||
// Symbol table:
|
// Symbol table:
|
||||||
uint64_t DynSymAddr = 0;
|
uint64_t DynSymAddr = 0;
|
||||||
// Hash tables:
|
// Hash tables:
|
||||||
Optional<uint64_t> ElfHash;
|
std::optional<uint64_t> ElfHash;
|
||||||
Optional<uint64_t> GnuHash;
|
std::optional<uint64_t> GnuHash;
|
||||||
};
|
};
|
||||||
|
|
||||||
/// This initializes an ELF file header with information specific to a binary
|
/// This initializes an ELF file header with information specific to a binary
|
||||||
|
|
Loading…
Reference in New Issue