[llvm] d6e3dba - [InterfaceStub] Use std::optional in ELFObjHandler.cpp (NFC)
Kazu Hirata via llvm-commits
llvm-commits at lists.llvm.org
Fri Nov 25 12:14:28 PST 2022
Author: Kazu Hirata
Date: 2022-11-25T12:14:22-08:00
New Revision: d6e3dbabf96b811dba453300c11c6b6db8f0b2cf
URL: https://github.com/llvm/llvm-project/commit/d6e3dbabf96b811dba453300c11c6b6db8f0b2cf
DIFF: https://github.com/llvm/llvm-project/commit/d6e3dbabf96b811dba453300c11c6b6db8f0b2cf.diff
LOG: [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
Added:
Modified:
llvm/lib/InterfaceStub/ELFObjHandler.cpp
Removed:
################################################################################
diff --git a/llvm/lib/InterfaceStub/ELFObjHandler.cpp b/llvm/lib/InterfaceStub/ELFObjHandler.cpp
index 13801cd2cbc00..49ed27e265d40 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 <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
More information about the llvm-commits
mailing list