diff options
author | Kazu Hirata <kazu@google.com> | 2022-11-25 12:44:51 -0800 |
---|---|---|
committer | Kazu Hirata <kazu@google.com> | 2022-11-25 12:44:51 -0800 |
commit | 96ebf9bc8016543e404c856cd0839d3bffbbf718 (patch) | |
tree | b2843d673a631832df2390ea5b55789f319910e5 /llvm/lib/Object/ELFObjectFile.cpp | |
parent | 573ff0f7d2b092b08aafb749efa6f9b90fea3e1b (diff) | |
download | llvm-96ebf9bc8016543e404c856cd0839d3bffbbf718.zip llvm-96ebf9bc8016543e404c856cd0839d3bffbbf718.tar.gz llvm-96ebf9bc8016543e404c856cd0839d3bffbbf718.tar.bz2 |
[Object] Use std::optional in ELFObjectFile.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
Diffstat (limited to 'llvm/lib/Object/ELFObjectFile.cpp')
-rw-r--r-- | llvm/lib/Object/ELFObjectFile.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/lib/Object/ELFObjectFile.cpp b/llvm/lib/Object/ELFObjectFile.cpp index 7a88b59..e16d275 100644 --- a/llvm/lib/Object/ELFObjectFile.cpp +++ b/llvm/lib/Object/ELFObjectFile.cpp @@ -29,6 +29,7 @@ #include <cstddef> #include <cstdint> #include <memory> +#include <optional> #include <string> #include <utility> @@ -624,7 +625,7 @@ ELFObjectFileBase::getPltAddresses() const { T->createMCInstrAnalysis(MII.get())); if (!MIA) return {}; - Optional<SectionRef> Plt, RelaPlt, GotPlt; + std::optional<SectionRef> Plt, RelaPlt, GotPlt; for (const SectionRef &Section : sections()) { Expected<StringRef> NameOrErr = Section.getName(); if (!NameOrErr) { |