[llvm] d53a3dd - [DWARF] Use std::optional in DWARFDebugFrame.cpp (NFC)
Kazu Hirata via llvm-commits
llvm-commits at lists.llvm.org
Fri Nov 25 11:41:50 PST 2022
Author: Kazu Hirata
Date: 2022-11-25T11:41:44-08:00
New Revision: d53a3dd4505cfc3ca32bd8a4d5e4daea39ed8ed0
URL: https://github.com/llvm/llvm-project/commit/d53a3dd4505cfc3ca32bd8a4d5e4daea39ed8ed0
DIFF: https://github.com/llvm/llvm-project/commit/d53a3dd4505cfc3ca32bd8a4d5e4daea39ed8ed0.diff
LOG: [DWARF] Use std::optional in DWARFDebugFrame.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/DebugInfo/DWARF/DWARFDebugFrame.cpp
Removed:
################################################################################
diff --git a/llvm/lib/DebugInfo/DWARF/DWARFDebugFrame.cpp b/llvm/lib/DebugInfo/DWARF/DWARFDebugFrame.cpp
index cf9057c99dbd7..3bf80dcb2c9cd 100644
--- a/llvm/lib/DebugInfo/DWARF/DWARFDebugFrame.cpp
+++ b/llvm/lib/DebugInfo/DWARF/DWARFDebugFrame.cpp
@@ -25,6 +25,7 @@
#include <cassert>
#include <cinttypes>
#include <cstdint>
+#include <optional>
using namespace llvm;
using namespace dwarf;
@@ -1091,7 +1092,7 @@ Error DWARFDebugFrame::parse(DWARFDataExtractor Data) {
Optional<uint64_t> Personality;
Optional<uint32_t> PersonalityEncoding;
if (IsEH) {
- Optional<uint64_t> AugmentationLength;
+ std::optional<uint64_t> AugmentationLength;
uint64_t StartAugmentationOffset;
uint64_t EndAugmentationOffset;
More information about the llvm-commits
mailing list